Missing name field: fetchTokenBalances() in balances.js wasn't including item.token.name in the returned balance objects, so the contract info well had no name to display.
No fallback to known token list: When the token balance entry (tb) was missing or had empty fields (e.g. Blockscout hadn't returned data yet, or the token was filtered), the code showed ? for symbol and left name/symbol/decimals blank in the contract info. Now it falls back to the built-in TOKEN_BY_ADDRESS known token list.
Changes:
src/shared/balances.js: Added name to the balance object returned by fetchTokenBalances
src/popup/views/addressToken.js: Symbol and contract info (name, symbol, decimals) now fall back to TOKEN_BY_ADDRESS
src/popup/views/send.js: Same fallback for symbol display in send view
Fixed in PR #54.
The root cause was two-fold:
1. **Missing `name` field**: `fetchTokenBalances()` in `balances.js` wasn't including `item.token.name` in the returned balance objects, so the contract info well had no name to display.
2. **No fallback to known token list**: When the token balance entry (`tb`) was missing or had empty fields (e.g. Blockscout hadn't returned data yet, or the token was filtered), the code showed `?` for symbol and left name/symbol/decimals blank in the contract info. Now it falls back to the built-in `TOKEN_BY_ADDRESS` known token list.
Changes:
- `src/shared/balances.js`: Added `name` to the balance object returned by `fetchTokenBalances`
- `src/popup/views/addressToken.js`: Symbol and contract info (name, symbol, decimals) now fall back to `TOKEN_BY_ADDRESS`
- `src/popup/views/send.js`: Same fallback for symbol display in send view
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
it also only has the contract address and URL in the well - no token name or symbol or decimals.
Fixed in PR #54.
The root cause was two-fold:
Missing
namefield:fetchTokenBalances()inbalances.jswasn't includingitem.token.namein the returned balance objects, so the contract info well had no name to display.No fallback to known token list: When the token balance entry (
tb) was missing or had empty fields (e.g. Blockscout hadn't returned data yet, or the token was filtered), the code showed?for symbol and left name/symbol/decimals blank in the contract info. Now it falls back to the built-inTOKEN_BY_ADDRESSknown token list.Changes:
src/shared/balances.js: Addednameto the balance object returned byfetchTokenBalancessrc/popup/views/addressToken.js: Symbol and contract info (name, symbol, decimals) now fall back toTOKEN_BY_ADDRESSsrc/popup/views/send.js: Same fallback for symbol display in send view