Uh oh!
There was an error while loading. Please reload this page.
fix(wallet): report when balance skips Solana instead of dropping it silently - #93
fix(wallet): report when balance skips Solana instead of dropping it silently#93psmiratisu wants to merge 1 commit into
Conversation
…silently `wallet balance` with no flags queries every sponsored chain plus Solana. If `getSolanaWalletAddress()` throws, the non-explicit path removes Solana from the queried set and the command still succeeds — so the output is indistinguishable from a wallet that genuinely holds nothing on Solana. Only the TTY view hinted at it, via the trailing `Checked: … (N chains)` line. `--json` exposed the skip solely as a shorter `chains[]` array, and the piped TSV said nothing at all. A consumer reading `tokens` and finding no Solana rows would reasonably report zero holdings when the truth is that Solana was never scanned. Track the drop and surface it the same three ways `stocksUnavailable` already does: - `--json`: `solanaUnavailable: true` alongside `stocksUnavailable` - TTY: a yellow note under the `Checked:` line - TSV: a warning on stderr, keeping stdout parseable `wallet sol balance` and `--chain-id`/`--cluster` requests are unaffected — those take the explicit path and still throw, so the flag stays false.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 347d369. Configure here.
| "Solana was not checked (wallet could not be resolved) — any Solana holdings are not shown. Retry in a moment." | ||
| )}\n` | ||
| ); | ||
| } |
There was a problem hiding this comment.
TTY warning skips single-chain path
Medium Severity
The TTY solanaUnavailable note sits only inside the multi-network branch, while stocksUnavailable is emitted for both single and multi. After a non-explicit Solana drop that leaves one EVM network, single is true and the yellow warning never prints, so interactive output still looks like Solana was scanned and empty. JSON and TSV already surface the flag in that case.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 347d369. Configure here.


Problem
acp wallet balancewith no flags queries every sponsored chain plus Solana. WhengetSolanaWalletAddress()throws, the non-explicit path drops Solana from the queried set and the command still succeeds:The result is indistinguishable from a wallet that genuinely holds nothing on Solana, and the three output modes disclose it unequally:
Checked: … (N chains)footer — the only real hint--jsonchains[], i.e. inference from absenceA consumer that reads
tokensand finds no Solana rows will report zero holdings when the truth is that Solana was never scanned. That is a silent false negative about someone's balance.Fix
Track the drop and surface it the same three ways
stocksUnavailablealready does for the tokenized-stock fetch:--json—solanaUnavailable: true, emitted next tostocksUnavailableChecked:lineThis turns an inference-from-absence into an explicit boolean, matching the convention already established in the same file.
Scope
wallet sol balancecallsgetSolanaWalletAddress()directly and throws on failure, so it never reaches the drop path. Unchanged.--chain-id/--clusterrequests still throw rather than skipping. Unchanged.Verification
npx tsc --noEmit— no new errors. Two pre-existing errors insrc/lib/agentFactory.tsandsrc/lib/config.tsare identical before and after this change (localacp-node-v2version skew, unrelated).npm run buildsucceeds; the flag and both warning strings are present indist/bin/acp.js.Note
Low Risk
CLI output-only change: same skip behavior, now explicitly reported. No auth, scanning, or API contract change except an optional JSON flag.
Overview
When the default all-chains
wallet balancecannot resolve a Solana wallet, it still drops Solana and continues with EVM, but that skip is no longer silent.solanaUnavailableis set on the drop path and surfaced the same way asstocksUnavailable: optionalsolanaUnavailable: truein JSON (omitted when false), a yellow TTY note under the Checked line, and a TSV warning on stderr. Callers can tell “no Solana tokens” from “Solana was never scanned.” Explicit Solana requests still throw.Reviewed by Cursor Bugbot for commit 347d369. Bugbot is set up for automated code reviews on this repo. Configure here.