The balance lists on Home, AddressDetail and DeleteAddress, for an address just added with "+" (src/popup/views/home.js, balanceLinesForAddress() in src/popup/views/helpers.js).
What happens
Found by the review of #664, and the same on next. A new address starts with no balance entries. While "Show tracked tokens with zero balance" is on, every tracked token reads 0.0000 at that address until a refresh returns, though no refresh has read it. Read from the code; not run in a browser.
What should happen
README's balance rules say an amount that is really there is never printed as 0.0000. A tracked token's line at an address no refresh has read does not state zero.
Severity: minor
Definition of done
Until a refresh has read a new address, its tracked tokens' lines read quantity unknown, or are left out.
A Jest test, failing on next.
Model: opus-5-5
## Where
The balance lists on Home, AddressDetail and DeleteAddress, for an address just added with "+" (`src/popup/views/home.js`, `balanceLinesForAddress()` in `src/popup/views/helpers.js`).
## What happens
Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/664, and the same on `next`. A new address starts with no balance entries. While "Show tracked tokens with zero balance" is on, every tracked token reads `0.0000` at that address until a refresh returns, though no refresh has read it. Read from the code; not run in a browser.
## What should happen
README's balance rules say an amount that is really there is never printed as `0.0000`. A tracked token's line at an address no refresh has read does not state zero.
Severity: minor
## Definition of done
- [ ] Until a refresh has read a new address, its tracked tokens' lines read `quantity unknown`, or are left out.
- [ ] A Jest test, failing on `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-03 01:32:51 +01:00
Plan: one PR to next, after #719, which changes the same line. It also covers what the review of #664 noted: after a network switch, every tracked token reads 0.0000 until the first refresh returns.
The mark that #664 added, balanceNotFetched, already says this, and a refresh already clears it. So:
applyChainSwitchFields() sets it on each token of the incoming network's list.
When an address or a wallet is added (home.js, addWallet.js), each token in trackedTokens gets it, through one small function beside trackToken() in src/popup/views/helpers.js.
The comment inside updateSendBalance() in src/popup/views/send.js stops saying a null balance only means an unknown scale.
Tests in tests/addedTokenBalance.test.js, each failing on next: a new address, a new wallet, and a network switch each read quantity unknown until a refresh has read the balance.
Model: opus-5-5
Plan: one PR to `next`, after https://git.eeqj.de/sneak/AutistMask/issues/719, which changes the same line. It also covers what the review of https://git.eeqj.de/sneak/AutistMask/pulls/664 noted: after a network switch, every tracked token reads `0.0000` until the first refresh returns.
The mark that https://git.eeqj.de/sneak/AutistMask/pulls/664 added, `balanceNotFetched`, already says this, and a refresh already clears it. So:
- `applyChainSwitchFields()` sets it on each token of the incoming network's list.
- When an address or a wallet is added (`home.js`, `addWallet.js`), each token in `trackedTokens` gets it, through one small function beside `trackToken()` in `src/popup/views/helpers.js`.
- The comment inside `updateSendBalance()` in `src/popup/views/send.js` stops saying a null balance only means an unknown scale.
Tests in `tests/addedTokenBalance.test.js`, each failing on `next`: a new address, a new wallet, and a network switch each read `quantity unknown` until a refresh has read the balance.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Where
The balance lists on Home, AddressDetail and DeleteAddress, for an address just added with "+" (
src/popup/views/home.js,balanceLinesForAddress()insrc/popup/views/helpers.js).What happens
Found by the review of #664, and the same on
next. A new address starts with no balance entries. While "Show tracked tokens with zero balance" is on, every tracked token reads0.0000at that address until a refresh returns, though no refresh has read it. Read from the code; not run in a browser.What should happen
README's balance rules say an amount that is really there is never printed as
0.0000. A tracked token's line at an address no refresh has read does not state zero.Severity: minor
Definition of done
quantity unknown, or are left out.next.Model: opus-5-5
Plan: one PR to
next, after #719, which changes the same line. It also covers what the review of #664 noted: after a network switch, every tracked token reads0.0000until the first refresh returns.The mark that #664 added,
balanceNotFetched, already says this, and a refresh already clears it. So:applyChainSwitchFields()sets it on each token of the incoming network's list.home.js,addWallet.js), each token intrackedTokensgets it, through one small function besidetrackToken()insrc/popup/views/helpers.js.updateSendBalance()insrc/popup/views/send.jsstops saying a null balance only means an unknown scale.Tests in
tests/addedTokenBalance.test.js, each failing onnext: a new address, a new wallet, and a network switch each readquantity unknownuntil a refresh has read the balance.Model: opus-5-5