1 Commits
Author SHA1 Message Date
sneak ab459e4736 fix: the address screen shows a token just added at its fetched balance, not 0.0000 (closes #516)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
A balance refresh that returns now draws the balances on AddressDetail or
AddressToken again when that screen is up, not only the wallet list. Their
transaction lists are left alone.

Every add path on AddToken and SettingsAddToken tracks a token through
trackToken(), which gives the tracked record `balanceNotFetched: true`. While
the field is set, the token's line reads `quantity unknown` instead of 0.0000.
The popup's refresh deletes the field once it has read the token's balance at
every address. refreshBalances() now resolves with those tokens. The field is
part of the tracked record, so removing the token removes it, and each network
keeps its own records.

Model: opus-5-5
2026-10-26 23:12:56 +00:00
+7 -8
View File
@@ -2230,14 +2230,13 @@ view would leave a wallet one click from deletion.
- "Add" button
- **Transitions**:
- "Add" (valid contract) → tracks the token, pops the stack, and re-renders
**AddressDetail**. Until a balance refresh on the token's network has read
the token's balance at every address, its line never reads `0.0000`. The
line reads `quantity unknown` instead, or is left out while "Show tracked
tokens with zero balance" is off. Where Blockscout already listed a
holding of the token, the line shows that holding. Until that refresh, the
tracked token's record carries `balanceNotFetched`, so the line still
reads `quantity unknown` after the popup closes and opens again. A refresh
that returns draws AddressDetail's balances again (see Navigation), so the
**AddressDetail**. The token's line reads `quantity unknown`, never
`0.0000`, until a balance refresh on the token's network has read its
balance at every address. Where Blockscout already listed a holding of the
token, the line shows that holding. Until that refresh, the tracked
token's record carries `balanceNotFetched`, so the line still reads
`quantity unknown` after the popup closes and opens again. A refresh that
returns draws AddressDetail's balances again (see Navigation), so the
fetched balance shows without the screen being reopened
- "Add" with a token already tracked, a scam-listed address, or a failed
contract lookup → flash message, no screen change