Skip to content

Commit 62637ad

Browse files
Hiksangclaude
andcommitted
feat: show referral opt-in hint after wallet set (when disabled)
JSON output includes referralHint with explanation. CLI output shows gray hint line. Only appears when referrals are off. Clearly marked as optional with "no extra fees" note. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0f2d1a2 commit 62637ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/commands/wallet.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,15 @@ export function registerWalletCommands(program: Command, isJson: () => boolean)
468468
}
469469
}
470470

471+
const settings = loadSettings();
472+
const referralHint = !settings.referrals
473+
? { referrals: false, hint: "Optional: 'perp settings referrals on' to support perp-cli development (no extra fees — exchange rebates only)" }
474+
: undefined;
475+
471476
if (isJson()) return printJson(jsonOk({
472477
exchange: resolved, address, envFile: ENV_FILE, default: !!opts.default,
473478
...(resolved === "lighter" && { lighterApiKey: lighterApiSetup }),
479+
...(referralHint && { referralHint }),
474480
}));
475481

476482
console.log(chalk.green(`\n ${resolved} configured.`));
@@ -485,6 +491,10 @@ export function registerWalletCommands(program: Command, isJson: () => boolean)
485491
console.log(chalk.gray(` You can retry: perp -e lighter manage setup-api-key`));
486492
}
487493
}
494+
if (!settings.referrals) {
495+
console.log(chalk.gray(` Optional: ${chalk.cyan("perp settings referrals on")} to support perp-cli development`));
496+
console.log(chalk.gray(` (no extra fees — exchange rebates only)`));
497+
}
488498
console.log();
489499
});
490500

0 commit comments

Comments
 (0)