fix: a tracked token reads quantity unknown at an address no refresh has read (closes #720)
A new address, a new wallet and a network switch each leave tracked tokens with no balance entry, so their lines read 0.0000 before any refresh had read them. Each of these now sets `balanceNotFetched` on the tracked tokens, and a refresh already clears it. Their lines read `quantity unknown` until then. Addresses that the wallet scan finds get the same. A refresh that did not read every address the page now holds leaves the field set. Model: opus-5-5
This commit was merged in pull request #735.
This commit is contained in:
@@ -242,10 +242,11 @@ function updateSendBalance() {
|
||||
state.trackedTokens,
|
||||
currentNetwork().chainId,
|
||||
);
|
||||
// A null balance is a holding whose scale is unknown. Saying a figure
|
||||
// for it would be a claim about the amount, so it reads as the
|
||||
// confirmation screen's balance line reads it; the send itself is
|
||||
// refused later by transferAmountUnits() for the same missing scale.
|
||||
// A null balance is a holding whose scale is unknown, or a tracked
|
||||
// token whose balance no refresh has read. Saying a figure for it would
|
||||
// be a claim about the amount, so it reads as the confirmation screen's
|
||||
// balance line reads it. transferAmountUnits() later refuses a send at
|
||||
// a missing scale.
|
||||
const bal = tokenBalanceAndDecimals(addr, token).tokenBalance;
|
||||
$("send-balance").textContent =
|
||||
bal == null
|
||||
|
||||
Reference in New Issue
Block a user