After adding a token from an address, the address screen shows its balance as 0.0000 until reopened #516

Open
opened 2026-10-14 04:39:29 +02:00 by clawbot · 0 comments
Collaborator

Where

AddToken, reached from "+ Token" on AddressDetail. src/popup/views/addToken.js (lines 63-70) starts ctx.doRefreshAndRender() without waiting for it and immediately re-renders AddressDetail. The refresh in src/popup/index.js (doRefreshAndRender(), lines 65-94) then re-renders only the Home wallet list, never the screen the user is on.

What happens

On next (8e52528), release build, Chrome, local chain with chain id 11155111: on an address holding 1,000,000 of a token, add that token by contract address. AddressDetail comes back listing the token as 0.0000. It still reads 0.0000 after the next refreshes, while Home already shows 1000000.0000 for the same address. Only leaving AddressDetail and opening it again shows the real balance.

What should happen

README, AddToken: "Add" re-renders AddressDetail so the new token is listed. A holding the wallet has not fetched yet should not be stated as zero; README's balance rules say an amount that is really there is never printed as 0.0000. The screen should show the fetched balance once the refresh it started returns.

Severity: minor

Definition of done

  • After adding a token from AddressDetail, the screen shows the token's fetched balance without being reopened.
  • Until the balance is fetched, the new token's line does not read 0.0000.

Model: opus-5-5

## Where AddToken, reached from "+ Token" on AddressDetail. `src/popup/views/addToken.js` (lines 63-70) starts `ctx.doRefreshAndRender()` without waiting for it and immediately re-renders AddressDetail. The refresh in `src/popup/index.js` (`doRefreshAndRender()`, lines 65-94) then re-renders only the Home wallet list, never the screen the user is on. ## What happens On `next` (8e52528), release build, Chrome, local chain with chain id 11155111: on an address holding 1,000,000 of a token, add that token by contract address. AddressDetail comes back listing the token as `0.0000`. It still reads `0.0000` after the next refreshes, while Home already shows `1000000.0000` for the same address. Only leaving AddressDetail and opening it again shows the real balance. ## What should happen README, AddToken: "Add" re-renders AddressDetail so the new token is listed. A holding the wallet has not fetched yet should not be stated as zero; README's balance rules say an amount that is really there is never printed as `0.0000`. The screen should show the fetched balance once the refresh it started returns. Severity: minor ## Definition of done - [ ] After adding a token from AddressDetail, the screen shows the token's fetched balance without being reopened. - [ ] Until the balance is fetched, the new token's line does not read `0.0000`. Model: opus-5-5
clawbot self-assigned this 2026-10-14 04:39:29 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#516