fix: the bundled token list names tokens on Ethereum Mainnet only (closes #632)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

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:
clawbot
2026-10-27 17:27:58 +00:00
committed by sneak
parent 08e47c39ad
commit bdaf821be2
16 changed files with 291 additions and 44 deletions
+3 -1
View File
@@ -111,13 +111,15 @@ function respondWith(items) {
}
// Fetch and place the result exactly where refreshBalances() places it, so the
// approval screens read what a real refresh would have left on state.
// approval screens read what a real refresh on Ethereum Mainnet would have
// left on state.
async function fetchOnto(items, trackedTokens = []) {
respondWith(items);
const balances = await fetchTokenBalances(
HOLDER,
BLOCKSCOUT,
trackedTokens,
"0x1",
);
state.trackedTokens = trackedTokens;
state.wallets = [