fix: the bundled token list names tokens on Ethereum Mainnet only (closes #632)
bundledToken(address, chainId) in tokenList.js answers only for Ethereum Mainnet's chain id. Every reader of the bundled list now goes through it, with the chain id of the transaction, balance or history entry it draws. The token sources the screens build carry that chain id. The Uniswap decoder sets the transaction's chain id on them. fetchTokenBalances() takes the chain id of the network it asks about. Seven existing tests read the bundled list without naming a network. Each now names Ethereum Mainnet. Model: opus-5-5
This commit is contained in:
@@ -1188,11 +1188,12 @@ The wallet takes the `decimals` from these sources, in this order
|
||||
"Use Blockscout" is on (`tokenSourcesByChainId()` in
|
||||
`src/popup/views/helpers.js`).
|
||||
|
||||
The token's name comes from the same sources. While "Use Blockscout" is off, a
|
||||
token gets a line under it when the bundled list and the tracked tokens lack its
|
||||
name or decimals. The line says "Blockscout's report of your balances is not
|
||||
used to name this token, because "Use Blockscout" is off in Settings." These
|
||||
screens show the line:
|
||||
The token's name comes from the same sources. The bundled token list is used
|
||||
only for a token on Ethereum Mainnet. While "Use Blockscout" is off, a token
|
||||
gets a line under it when the bundled list and the tracked tokens lack its name
|
||||
or decimals. The line says "Blockscout's report of your balances is not used to
|
||||
name this token, because "Use Blockscout" is off in Settings." These screens
|
||||
show the line:
|
||||
|
||||
- TxApproval and SignApproval
|
||||
- WaitTx, SuccessTx and ErrorTx, which follow TxApproval
|
||||
|
||||
Reference in New Issue
Block a user