fix: the ETH line reads unknown at an address no refresh has read (closes #736)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

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
This commit was merged in pull request #741.
This commit is contained in:
2026-11-03 11:24:18 +01:00
parent 448afdb5ce
commit 9c691dfa6b
21 changed files with 470 additions and 67 deletions
+20 -5
View File
@@ -1025,6 +1025,8 @@ removing the address only stops the wallet tracking it. It explains the way
back: delete the whole wallet in Settings and import its backup again. The scan
after an import finds only addresses with on-chain activity. When the address
holds anything, the screen lists the holdings and the USD total under a warning.
An ETH balance that no refresh has read counts as holding something. The warning
then reads "This address may hold a balance."
"Remove Address" removes the address and its site permissions. It returns to
Home with the flash message "Address removed." The wallet's `nextIndex` is not
@@ -1212,13 +1214,25 @@ there in place of a zero. It does so after each of these:
- an address or a wallet is added;
- the network is switched.
This lasts until a refresh has read the token's balance at every address.
This lasts until a refresh in the popup has read the token's balance at every
address.
An address's ETH balance is `null` until a refresh has read that address. This
holds for a new address, and for every address after a network switch. While it
is `null`:
- the balance lists show "quantity unknown";
- Home's ETH balance reads `unknown (ETH)`;
- Send reads `Current balance: unknown (ETH)`, and "Max" fills in nothing;
- "Send" is not refused for a zero balance;
- the address has no total;
- DeleteAddress shows its warning.
Only a whole number from 0 to 80 counts as a token's decimals. A token's
`decimals` is stored only as a source reported it, never guessed. A `null`
balance means the decimals are unknown, never that the balance is zero. While
"Use Blockscout" is off, the bundled list and the tracked tokens may lack a
token's symbol or decimals. The approval and status screens then add a line
`decimals` is stored only as a source reported it, never guessed. A token's
`null` balance means the decimals are unknown, never that the balance is zero.
While "Use Blockscout" is off, the bundled list and the tracked tokens may lack
a token's symbol or decimals. The approval and status screens then add a line
under that token saying that Blockscout's report is not used.
The wallet's own ERC-20 send is encoded with the decimals the screen showed. At
@@ -1254,6 +1268,7 @@ unpriced holding was left out. `formatAddressTotal()` renders that result the
same way on every screen:
- on Sepolia, or before the first price fetch: no total;
- while the address's ETH balance is unknown: no total;
- everything priced: `Total: $5,500.00`;
- part priced: `Total: $3,000.00 plus unpriced tokens`;
- nothing priced but something held: `Total: unpriced tokens only`.