Skip to content

Commit cb7ff3c

Browse files
committed
fix: rerun hint points at node unlock and preserves dry-run mode
The launcher success footer previously told users to rerun `node dexbot test` (or `node dexbot drystart` for dry runs). The canonical restart entry point is now `node unlock`, which takes `--dryrun` as a flag rather than a separate subcommand. Changes: - dexbot.ts: replace the per-mode command string with a single `node unlock` invocation; inject ` --dryrun` for dry runs so a `drystart` user is not silently downgraded to live mode on relaunch. Shorten the trailing clause to drop the redundant "to start it again" / "in dry-run mode" suffix. - tests/test_dexbot_startup_output.ts: update the assertion to match the new hint text.
1 parent 9b3f4f1 commit cb7ff3c

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

dexbot.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,14 @@ function printStartLauncherHeader({ botName = null, dryRun = false } = {}) {
363363
}
364364

365365
function printStartLauncherSuccess({ botName = null, dryRun = false } = {}) {
366-
const command = dryRun ? 'drystart' : 'test';
367-
const target = botName ? ` ${botName}` : '';
366+
const dryrunFlag = dryRun ? ' --dryrun' : '';
368367
console.log();
369368
console.log('='.repeat(50));
370369
console.log(startupSuccess('DEXBot2 started successfully!'));
371370
if (botName) {
372-
console.log(`If the bot stops, rerun \`node dexbot ${command}${target}\` to start it again.`);
371+
console.log(`If the bot stops, rerun \`node unlock${dryrunFlag} ${botName}\`.`);
373372
} else {
374-
console.log(`If the bots stop, rerun \`node dexbot ${command}\` to start them again.`);
373+
console.log(`If the bots stop, rerun \`node unlock${dryrunFlag}\`.`);
375374
}
376375
console.log('='.repeat(50));
377376
console.log();

tests/test_dexbot_startup_output.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ require('../dexbot');
239239
assert.ok(logs.includes('Number active bots: 1'), 'dexbot start should print the active bot count');
240240
assert.ok(logs.includes('Starting bot runtime...'), 'dexbot start should print the runtime transition');
241241
assert.ok(logs.includes('DEXBot2 started successfully!'), 'dexbot start should print a success footer');
242-
assert.ok(logs.includes('If the bots stop, rerun `node dexbot test` to start them again.'), 'dexbot start should print the restart hint');
242+
assert.ok(logs.includes('If the bots stop, rerun `node unlock`.'), 'dexbot start should print the restart hint');
243243
assert.deepStrictEqual(logs.filter((line) => line.startsWith('┌') || line.startsWith('│') || line.startsWith('├') || line.startsWith('└')), [], 'dexbot start should not emit PM2-style tables');
244244
assert.ok(!logs.some((line) => line.includes('Connecting to BitShares...')), 'dexbot start should not print a separate connection banner');
245245
assert.ok(!logs.some((line) => line.includes('Authenticating master password...')), 'dexbot start should not print an auth banner');

0 commit comments

Comments
 (0)