balance list on address-token for USDC shows ? for symbol #51
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#51
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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