Improve x402 wallet UX: bare command shows info, deprecate info subcommand#295
Merged
Conversation
Running "mcpc x402" with no subcommand previously printed the command help, which is inconsistent with other commands. It now shows wallet info (or how to create a wallet) plus a hint pointing to "mcpc help x402" for the full reference. The "info" subcommand is deprecated: it is hidden from help and prints a deprecation warning, and will be removed in a future release. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
Change "ETH Balance"/"USDC Balance" to lowercase "balance" and always show at least 6 decimal places (e.g. "1.000000"), keeping any extra precision. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
Clarify that "x402 sign" signs the PAYMENT-REQUIRED header offline and prints the PAYMENT-SIGNATURE header to stdout, and add the standard "JSON output (--json):" section to every x402 subcommand's help, matching the other commands. Move the shared jsonHelp helper into output.ts so both index.ts and the x402 command can use it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
Render the wallet funding QR code with chalk.whiteBright so the modules stand out against the terminal background and are easier to scan. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
jancurn
commented
Jun 27, 2026
| console.log(` ${chalk.bold('USDC balance')} ${padDecimals(usdcBalance, 6)}`); | ||
| } else { | ||
| console.log(` ${chalk.bold('Balances')} ${theme.red('Failed to fetch')}`); | ||
| console.log(` ${chalk.bold('balances')} ${theme.red('Failed to fetch')}`); |
Member
Author
There was a problem hiding this comment.
Show this as one text "Failed to fetch balances"
Member
Author
There was a problem hiding this comment.
Done — now shows a single red Failed to fetch balances line instead of a balances label with a Failed to fetch value (413a873).
Generated by Claude Code
Address review feedback: render the balance-fetch failure as one "Failed to fetch balances" message instead of a "balances" label paired with a "Failed to fetch" value. Refs #295 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
Resolve CHANGELOG.md conflict by keeping both Unreleased entries (Changed before Fixed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM
jancurn
marked this pull request as ready for review
July 8, 2026 13:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mcpc x402with no subcommand now shows the wallet info (address, balances, funding QR code) instead of the command help, matching how other commands behave. Themcpc x402 infosubcommand is deprecated — hidden from help, prints a warning — and will be removed in a future release.--jsonoutput shape, andx402 signexplains that it prints the PAYMENT-SIGNATURE header to stdoutjsonHelp()helper moved fromindex.tstooutput.tsfor reuse🤖 Generated with Claude Code
https://claude.ai/code/session_014hPgskXe8VWjXW4aFJixaM