When tokenBalances doesn'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 in tokenList.js that checks:
tokenBalances array (live balance data)
TOKEN_BY_ADDRESS (511 known tokens)
state.trackedTokens (user-added tokens)
Truncated address as last resort
Applied in both addressToken.js and send.js.
make check passes.
Closes #51
When `tokenBalances` doesn'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 in `tokenList.js` that checks:
1. `tokenBalances` array (live balance data)
2. `TOKEN_BY_ADDRESS` (511 known tokens)
3. `state.trackedTokens` (user-added tokens)
4. Truncated address as last resort
Applied in both `addressToken.js` and `send.js`.
`make check` passes.
sneak
was assigned by clawbot2026-02-28 17:35:43 +01:00
When tokenBalances doesn't contain an entry for a token (e.g. before
balances are fetched), the symbol fell back to '?' in addressToken
and send views.
Add resolveSymbol() helper that checks tokenBalances → TOKEN_BY_ADDRESS
(known tokens) → trackedTokens → truncated address as last resort.
Fixes USDC and other known tokens showing '?' when balance data
hasn't loaded yet.
make check passes (tests + prettier). Code looks good overall.
One nit:TOKEN_BY_ADDRESS is imported in send.js (line 15) but never used directly — only resolveSymbol and KNOWN_SYMBOLS are 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).
## Review
`make check` passes (tests + prettier). Code looks good overall.
**One nit:** `TOKEN_BY_ADDRESS` is imported in `send.js` (line 15) but never used directly — only `resolveSymbol` and `KNOWN_SYMBOLS` are 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).
Rebased onto main and resolved all merge conflicts. Changes:
Resolved conflicts in addressToken.js and send.js — kept the resolveSymbol() approach from this PR instead of the inline resolution from #54
Removed unused TOKEN_BY_ADDRESS import from send.js per review feedback
make check passes (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 in tokenList.js, reducing code duplication across addressToken.js and send.js.
Rebased onto main and resolved all merge conflicts. Changes:
1. Resolved conflicts in `addressToken.js` and `send.js` — kept the `resolveSymbol()` approach from this PR instead of the inline resolution from #54
2. Removed unused `TOKEN_BY_ADDRESS` import from `send.js` per review feedback
3. `make check` passes (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 in `tokenList.js`, reducing code duplication across `addressToken.js` and `send.js`.
clawbot
requested review from sneak 2026-02-28 20:34:13 +01:00
Rebased onto current main — conflict resolved. The previously noted unused TOKEN_BY_ADDRESS import in send.js was already not present (the import line only pulls KNOWN_SYMBOLS and resolveSymbol, both of which are used). docker build . passes. Spawning review agent.
Rebased onto current `main` — conflict resolved. The previously noted unused `TOKEN_BY_ADDRESS` import in `send.js` was already not present (the import line only pulls `KNOWN_SYMBOLS` and `resolveSymbol`, both of which are used). `docker build .` passes. Spawning review agent.
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.
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.