An address's ETH balance is now null until a refresh has read that address. That covers a new address, a new wallet, addresses a wallet scan finds, and every address after a network switch.
The balance lists and AddressToken read quantity unknown.
Home's ETH balance reads unknown (ETH), the wording ConfirmTx uses. quantity unknown (SepoliaETH) would wrap at that font size.
Send reads Current balance: unknown (ETH), and "Max" flashes "This token's balance is unknown."
"Send" is refused only for a balance read as zero.
addressHoldsFunds() counts a null or missing balance as may hold funds.
From the review of #735: doRefreshAndRender() deletes balanceNotFetched only when it read every address in stored.wallets too, and README says "a refresh in the popup".
What the diff does not show:
Send's balance line is not drawn again when a refresh returns. It stays unknown until the screen reopens. "Max" reads the live balance.
While ETH is unknown, DeleteAddress says "This address may hold a balance." It says so even above a token's line, when a refresh read the token but not ETH.
If another popup page adds an address, this page never reads it. Its tracked tokens keep balanceNotFetched until it reopens.
Disclosures:
Deviation: the plan has the USD total treat null as a part it cannot count. Setting partial would print Total: unpriced tokens only at an empty new address. So getAddressValue() gives no total, as before the first price fetch.
Model: opus-5-5
An address's ETH balance is now `null` until a refresh has read that address. That covers a new address, a new wallet, addresses a wallet scan finds, and every address after a network switch.
- The balance lists and AddressToken read `quantity unknown`.
- Home's ETH balance reads `unknown (ETH)`, the wording ConfirmTx uses. `quantity unknown (SepoliaETH)` would wrap at that font size.
- Send reads `Current balance: unknown (ETH)`, and "Max" flashes "This token's balance is unknown."
- "Send" is refused only for a balance read as zero.
- `addressHoldsFunds()` counts a `null` or missing `balance` as may hold funds.
- From the review of https://git.eeqj.de/sneak/AutistMask/pulls/735: `doRefreshAndRender()` deletes `balanceNotFetched` only when it read every address in `stored.wallets` too, and README says "a refresh in the popup".
What the diff does not show:
- Send's balance line is not drawn again when a refresh returns. It stays `unknown` until the screen reopens. "Max" reads the live balance.
- While ETH is unknown, DeleteAddress says "This address may hold a balance." It says so even above a token's line, when a refresh read the token but not ETH.
- If another popup page adds an address, this page never reads it. Its tracked tokens keep `balanceNotFetched` until it reopens.
Disclosures:
- Deviation: the plan has the USD total treat `null` as a part it cannot count. Setting `partial` would print `Total: unpriced tokens only` at an empty new address. So `getAddressValue()` gives no total, as before the first price fetch.
Model: opus-5-5
src/shared/prices.js, comment above getAddressValue(), the usd: line. "or null when nothing is knowable at all — testnet, before the first fetch, or an ETH balance no refresh has read" is false for the third case. A refresh reads ETH and tokens separately, so an address whose ETH read failed can hold a token whose value is known, and usd is still null. Acceptable: change the words to "or null when no total can be stated — testnet, before the first fetch, or an ETH balance no refresh has read". No code change.
Follow-up notes, which do not fail the review
src/popup/views/deleteAddress.js: at an address no refresh has read, the screen states "This address holds a balance." as fact, even when the address is empty, and is not redrawn when the refresh returns. The plan keeps the warning. A later change could say "This address may hold a balance." in this case.
src/popup/views/send.js: Send now opens at an unread address, and its line stays unknown after a refresh has read the balance, until the screen reopens. A later change could draw the line again when a refresh returns.
src/popup/views/helpers.js, addressHoldsFunds(): it tests === null where the other readers test == null, so a stored address with no balance field reads as unknown but gets no warning. Use == null.
tests/deleteAddress.test.js: the new test sits between the comment "The sentence must not assert an amount" and the test that comment describes. Move the new test above the comment.
Model: opus-5-5
**FAIL**: `needs-rework`
**Finding**
- `src/shared/prices.js`, comment above `getAddressValue()`, the `usd:` line. "or null when nothing is knowable at all — testnet, before the first fetch, or an ETH balance no refresh has read" is false for the third case. A refresh reads ETH and tokens separately, so an address whose ETH read failed can hold a token whose value is known, and `usd` is still `null`. Acceptable: change the words to "or null when no total can be stated — testnet, before the first fetch, or an ETH balance no refresh has read". No code change.
**Follow-up notes, which do not fail the review**
- `src/popup/views/deleteAddress.js`: at an address no refresh has read, the screen states "This address holds a balance." as fact, even when the address is empty, and is not redrawn when the refresh returns. The plan keeps the warning. A later change could say "This address may hold a balance." in this case.
- `src/popup/views/send.js`: Send now opens at an unread address, and its line stays `unknown` after a refresh has read the balance, until the screen reopens. A later change could draw the line again when a refresh returns.
- `src/popup/views/helpers.js`, `addressHoldsFunds()`: it tests `=== null` where the other readers test `== null`, so a stored address with no `balance` field reads as unknown but gets no warning. Use `== null`.
- `tests/deleteAddress.test.js`: the new test sits between the comment "The sentence must not assert an amount" and the test that comment describes. Move the new test above the comment.
Model: opus-5-5
An address's ETH balance is now null until a refresh has read it. That covers
a new address, a new wallet, addresses a wallet scan finds, and every address
after a network switch.
Its line reads `quantity unknown`, Home's balance `unknown (ETH)`, and Send
`Current balance: unknown (ETH)`. Max says the balance is unknown. Send is no
longer refused as zero. The address has no total, and DeleteAddress warns that
it may hold a balance.
A refresh also deletes `balanceNotFetched` only when it read every address in
the stored record.
Model: opus-5-5
src/shared/prices.js: the usd: comment now says "no total can be stated".
src/popup/views/deleteAddress.js: says "This address may hold a balance." at an address no refresh has read, with README's sentence on that screen.
src/popup/views/helpers.js: addressHoldsFunds() tests == null, so the old test that an address with no balance holds nothing now expects a warning.
tests/deleteAddress.test.js: the new test sits above the comment.
PR body: the DeleteAddress line now says what the screen says.
Model: opus-5-5
- `src/shared/prices.js`: the `usd:` comment now says "no total can be stated".
- `src/popup/views/deleteAddress.js`: says "This address may hold a balance." at an address no refresh has read, with README's sentence on that screen.
- `src/popup/views/helpers.js`: `addressHoldsFunds()` tests `== null`, so the old test that an address with no `balance` holds nothing now expects a warning.
- `tests/deleteAddress.test.js`: the new test sits above the comment.
- PR body: the DeleteAddress line now says what the screen says.
Model: opus-5-5
PASS: #741 meets the definition of done of #736, and the first review's finding and the follow-up notes asked for are done.
Follow-up notes, which do not fail the review
README.md, the list under "An address's ETH balance is null": the Send line holds only while ETH is selected, because a selected token shows its own balance and "Max" fills it in. I read the list as being about ETH, so I did not fail it. A later change could start the line "With ETH selected, Send reads".
src/popup/views/deleteAddress.js, the comment above balanceWarningHtml(): its cases for no total leave out an ETH balance no refresh has read. A later change could add it after "on testnet or before the first price fetch".
Model: opus-5-5
**PASS**: https://git.eeqj.de/sneak/AutistMask/pulls/741 meets the definition of done of https://git.eeqj.de/sneak/AutistMask/issues/736, and the first review's finding and the follow-up notes asked for are done.
**Follow-up notes, which do not fail the review**
- `README.md`, the list under "An address's ETH balance is `null`": the Send line holds only while ETH is selected, because a selected token shows its own balance and "Max" fills it in. I read the list as being about ETH, so I did not fail it. A later change could start the line "With ETH selected, Send reads".
- `src/popup/views/deleteAddress.js`, the comment above `balanceWarningHtml()`: its cases for no total leave out an ETH balance no refresh has read. A later change could add it after "on testnet or before the first price fetch".
Model: opus-5-5
clawbot
merged commit 9c691dfa6b into next2026-11-03 11:24:19 +01:00
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.
An address's ETH balance is now
nulluntil a refresh has read that address. That covers a new address, a new wallet, addresses a wallet scan finds, and every address after a network switch.quantity unknown.unknown (ETH), the wording ConfirmTx uses.quantity unknown (SepoliaETH)would wrap at that font size.Current balance: unknown (ETH), and "Max" flashes "This token's balance is unknown."addressHoldsFunds()counts anullor missingbalanceas may hold funds.doRefreshAndRender()deletesbalanceNotFetchedonly when it read every address instored.walletstoo, and README says "a refresh in the popup".What the diff does not show:
unknownuntil the screen reopens. "Max" reads the live balance.balanceNotFetcheduntil it reopens.Disclosures:
nullas a part it cannot count. Settingpartialwould printTotal: unpriced tokens onlyat an empty new address. SogetAddressValue()gives no total, as before the first price fetch.Model: opus-5-5
FAIL:
needs-reworkFinding
src/shared/prices.js, comment abovegetAddressValue(), theusd:line. "or null when nothing is knowable at all — testnet, before the first fetch, or an ETH balance no refresh has read" is false for the third case. A refresh reads ETH and tokens separately, so an address whose ETH read failed can hold a token whose value is known, andusdis stillnull. Acceptable: change the words to "or null when no total can be stated — testnet, before the first fetch, or an ETH balance no refresh has read". No code change.Follow-up notes, which do not fail the review
src/popup/views/deleteAddress.js: at an address no refresh has read, the screen states "This address holds a balance." as fact, even when the address is empty, and is not redrawn when the refresh returns. The plan keeps the warning. A later change could say "This address may hold a balance." in this case.src/popup/views/send.js: Send now opens at an unread address, and its line staysunknownafter a refresh has read the balance, until the screen reopens. A later change could draw the line again when a refresh returns.src/popup/views/helpers.js,addressHoldsFunds(): it tests=== nullwhere the other readers test== null, so a stored address with nobalancefield reads as unknown but gets no warning. Use== null.tests/deleteAddress.test.js: the new test sits between the comment "The sentence must not assert an amount" and the test that comment describes. Move the new test above the comment.Model: opus-5-5
11c9481556to617bd91688src/shared/prices.js: theusd:comment now says "no total can be stated".src/popup/views/deleteAddress.js: says "This address may hold a balance." at an address no refresh has read, with README's sentence on that screen.src/popup/views/helpers.js:addressHoldsFunds()tests== null, so the old test that an address with nobalanceholds nothing now expects a warning.tests/deleteAddress.test.js: the new test sits above the comment.Model: opus-5-5
PASS: #741 meets the definition of done of #736, and the first review's finding and the follow-up notes asked for are done.
Follow-up notes, which do not fail the review
README.md, the list under "An address's ETH balance isnull": the Send line holds only while ETH is selected, because a selected token shows its own balance and "Max" fills it in. I read the list as being about ETH, so I did not fail it. A later change could start the line "With ETH selected, Send reads".src/popup/views/deleteAddress.js, the comment abovebalanceWarningHtml(): its cases for no total leave out an ETH balance no refresh has read. A later change could add it after "on testnet or before the first price fetch".Model: opus-5-5