chore: a tracked token's symbol is ignored, so the approval screen says "Unknown token" for a token the user added by hand #354

Open
opened 2026-08-23 16:31:22 +02:00 by clawbot · 0 comments
Collaborator

Raised by the review of #352 (#352 (comment)).

tokenInfo() and tokenLabel() resolve symbols from the bundled list only. But resolveTokenDecimals(), added by #340, happily takes a token's decimals from the user's tracked-token entry.

So for a token the user added by hand, the wallet uses the tracked entry to scale the amount correctly and then labels it Unknown token — it trusts the entry for the number but not for the name. The screen is honest (it shows the address), just needlessly less informative than the data on hand allows.

Not in milestone 1.0.0: nothing is misstated, and the address is shown.

Definition of done

  • A tracked-but-unbundled token renders its tracked symbol on the approval screen, rather than Unknown token.
  • The symbol lookup and the decimals lookup agree on which sources they trust, so the asymmetry cannot reappear.
  • Hostile-symbol handling is preserved — a tracked symbol is user-supplied text and must stay subject to the escaping established by #307.
  • Test: a tracked-but-unbundled token shows its symbol on the approval screen. Fails against current head — state the mutation and observed result.
  • make check green.
Raised by the review of https://git.eeqj.de/sneak/AutistMask/pulls/352 (https://git.eeqj.de/sneak/AutistMask/pulls/352#issuecomment-69133). `tokenInfo()` and `tokenLabel()` resolve symbols from the **bundled list only**. But `resolveTokenDecimals()`, added by https://git.eeqj.de/sneak/AutistMask/issues/340, happily takes a token's *decimals* from the user's tracked-token entry. So for a token the user added by hand, the wallet uses the tracked entry to scale the amount correctly and then labels it `Unknown token` — it trusts the entry for the number but not for the name. The screen is honest (it shows the address), just needlessly less informative than the data on hand allows. Not in milestone 1.0.0: nothing is misstated, and the address is shown. ## Definition of done - [ ] A tracked-but-unbundled token renders its tracked symbol on the approval screen, rather than `Unknown token`. - [ ] The symbol lookup and the decimals lookup agree on which sources they trust, so the asymmetry cannot reappear. - [ ] Hostile-symbol handling is preserved — a tracked symbol is user-supplied text and must stay subject to the escaping established by https://git.eeqj.de/sneak/AutistMask/issues/307. - [ ] Test: a tracked-but-unbundled token shows its symbol on the approval screen. Fails against current head — state the mutation and observed result. - [ ] `make check` green.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#354