The bundled mainnet token list names tokens on every network #632

Open
opened 2026-10-20 04:16:18 +02:00 by clawbot · 0 comments
Collaborator

Seen by the review of #630.

Where

TOKEN_BY_ADDRESS from src/shared/tokenList.js, the bundled list of Ethereum Mainnet tokens, is looked up first, whatever the network, by resolveTokenSymbol() and resolveTokenDecimals() in src/shared/approvalAmount.js, and also read in src/shared/balances.js, src/shared/transactions.js and src/popup/views/addressToken.js.

What happens

On Sepolia, a contract at the same address as a bundled mainnet token is named and scaled as that mainnet token, on the approval and transaction screens and wherever else those lookups run. A contract address names a token on one network only, as applyChainSwitchFields() already says of tracked tokens.

What should happen

The bundled list names and scales a token only for a transaction, balance or history entry on Ethereum Mainnet; on any other network a token is named only from what the wallet knows of that network's tokens.

Severity: minor

Definition of done

  • Every lookup of the bundled list applies it only for Ethereum Mainnet.
  • A Jest test with Sepolia active and a Sepolia transfer of a contract at a bundled token's address, failing on next.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/630. ## Where `TOKEN_BY_ADDRESS` from `src/shared/tokenList.js`, the bundled list of Ethereum Mainnet tokens, is looked up first, whatever the network, by `resolveTokenSymbol()` and `resolveTokenDecimals()` in `src/shared/approvalAmount.js`, and also read in `src/shared/balances.js`, `src/shared/transactions.js` and `src/popup/views/addressToken.js`. ## What happens On Sepolia, a contract at the same address as a bundled mainnet token is named and scaled as that mainnet token, on the approval and transaction screens and wherever else those lookups run. A contract address names a token on one network only, as `applyChainSwitchFields()` already says of tracked tokens. ## What should happen The bundled list names and scales a token only for a transaction, balance or history entry on Ethereum Mainnet; on any other network a token is named only from what the wallet knows of that network's tokens. Severity: minor ## Definition of done - [ ] Every lookup of the bundled list applies it only for Ethereum Mainnet. - [ ] A Jest test with Sepolia active and a Sepolia transfer of a contract at a bundled token's address, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-20 04:16:18 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#632