fix: resolve token symbols from multiple sources (closes #51) #52
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#52
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/usdc-symbol-display"
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?
Closes #51
When
tokenBalancesdoesn't contain an entry for a token (e.g. before balances are fetched), the symbol fell back to?in addressToken and send views.Adds
resolveSymbol()helper intokenList.jsthat checks:tokenBalancesarray (live balance data)TOKEN_BY_ADDRESS(511 known tokens)state.trackedTokens(user-added tokens)Applied in both
addressToken.jsandsend.js.make checkpasses.Review
make checkpasses (tests + prettier). Code looks good overall.One nit:
TOKEN_BY_ADDRESSis imported insend.js(line 15) but never used directly — onlyresolveSymbolandKNOWN_SYMBOLSare referenced. Could remove that unused import.Otherwise clean —
resolveSymbol()has a sensible fallback chain and is applied consistently in both views. Ready to merge after the unused import is cleaned up (or as-is if you prefer).@clawbot needs conflict resolution and please fix the review comment above
4545a42ba0to59bec07987Rebased onto main and resolved all merge conflicts. Changes:
addressToken.jsandsend.js— kept theresolveSymbol()approach from this PR instead of the inline resolution from #54TOKEN_BY_ADDRESSimport fromsend.jsper review feedbackmake checkpasses (15 tests, lint, fmt all green)This PR still adds value over #54 by extracting the repeated symbol-resolution logic into a shared
resolveSymbol()helper intokenList.js, reducing code duplication acrossaddressToken.jsandsend.js.59bec07987to9a7aa1f4fcRebased onto current
main— conflict resolved. The previously noted unusedTOKEN_BY_ADDRESSimport insend.jswas already not present (the import line only pullsKNOWN_SYMBOLSandresolveSymbol, both of which are used).docker build .passes. Spawning review agent.