fix: the balance list and the add-token screens apply the spoof rule to tracked tokens (closes #705)
The balance list gave a tracked token a zero row while "Show tracked tokens with zero balance" was on, even when the spoof rule refuses the token. balanceLinesForAddress() now asks isSpoofedSymbol() before it adds that row. AddToken and SettingsAddToken now refuse such a token after the contract lookup, with a flash message that says why. The bundled-list buttons on SettingsAddToken need no check, because the rule never refuses a bundled token. The README and docs/README.md now say that the balance list drops such a token whatever the settings. Model: opus-5-5
This commit is contained in:
@@ -1474,10 +1474,10 @@ tracked.
|
||||
A tracked token is shown when its balance is nonzero, and any other ERC-20 when
|
||||
its balance is nonzero and it is in the bundled known-token list or has 1,000 or
|
||||
more holders. A token claiming a symbol from the bundled list from any other
|
||||
contract address is always dropped, tracked or not, and so is any token claiming
|
||||
a symbol that belongs to the native asset and therefore has no legitimate
|
||||
contract at all (`"ETH"`, and every network's `nativeCurrency`, such as
|
||||
`"SepoliaETH"`, on every network). That filter is unconditional — the "Hide
|
||||
contract address is always dropped, whatever the settings, and so is any token
|
||||
claiming a symbol that belongs to the native asset and therefore has no
|
||||
legitimate contract at all (`"ETH"`, and every network's `nativeCurrency`, such
|
||||
as `"SepoliaETH"`, on every network). That filter is unconditional — the "Hide
|
||||
tokens with fewer than 1,000 holders" setting governs the transaction history
|
||||
and the send-screen token selector, not this list. A token's holder count is
|
||||
unknown when the explorer reports none, or reports anything other than a whole
|
||||
@@ -2239,6 +2239,9 @@ view would leave a wallet one click from deletion.
|
||||
**AddressDetail**
|
||||
- "Add" with a token already tracked, a scam-listed address, or a failed
|
||||
contract lookup → flash message, no screen change
|
||||
- "Add" with a token that the spoof rule refuses → nothing is tracked; "This
|
||||
is a fake token impersonating a known symbol, so it was not added." flash
|
||||
message, no screen change
|
||||
- "Add", then the contract lookup answers while another screen shows, or
|
||||
after AddToken was opened again → tracks the token, no screen change
|
||||
- "Add", then a network switch in Settings before the contract lookup
|
||||
@@ -2547,6 +2550,9 @@ view would leave a wallet one click from deletion.
|
||||
"Added SYMBOL" flash message (no screen change)
|
||||
- A duplicate, a scam-listed address, or a failed contract lookup → flash
|
||||
message, no screen change
|
||||
- "Add" by contract address with a token that the spoof rule refuses →
|
||||
nothing is tracked; "This is a fake token impersonating a known symbol, so
|
||||
it was not added." flash message, no screen change
|
||||
- "Add" by contract address, then a network switch in Settings before the
|
||||
lookup answers → nothing is tracked; "The active network changed before
|
||||
the lookup finished, so the token was not added." flash message, no screen
|
||||
|
||||
Reference in New Issue
Block a user