fix: fall back to known token list for symbol/name/decimals
All checks were successful
check / check (push) Successful in 22s

When a token's balance entry is missing or incomplete (e.g. not yet
fetched from Blockscout), the address-token view and send view now
fall back to the built-in known token list for symbol, name, and
decimals instead of showing '?'.

Also includes token name in the balance object returned by
fetchTokenBalances so the contract info well can display it.

Fixes #51
This commit is contained in:
user
2026-02-28 08:44:09 -08:00
parent fb67359b3f
commit 173d75c57a
3 changed files with 22 additions and 8 deletions

View File

@@ -85,6 +85,7 @@ async function fetchTokenBalances(address, blockscoutUrl, trackedTokens) {
balances.push({
address: item.token.address_hash,
name: item.token.name || "",
symbol: item.token.symbol || "???",
decimals: decimals,
balance: bal,