chore: stop using tokensChainsCache in confirmations#27611
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27611 +/- ##
==========================================
+ Coverage 82.19% 82.31% +0.11%
==========================================
Files 4788 4782 -6
Lines 123512 123416 -96
Branches 27364 27449 +85
==========================================
+ Hits 101516 101585 +69
+ Misses 14962 14793 -169
- Partials 7034 7038 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
tommasini
left a comment
There was a problem hiding this comment.
If tokensChainsCache entry is no longer needed, shouldn't we clean it from our users devices with a migration?
Yes but its use is bing gradually removed, it has not yet been fully removed, this is a PR that will allow this to be fully removed |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Impact chain:
SmokeConfirmations is selected because:
FlaskBuildTests is selected because:
Not selected:
The API mock change is a global default mock change, but since it returns an empty array (same as before for the existing endpoints), it shouldn't break other test suites - it just prevents real network calls to the new v3 endpoint. Performance Test Selection: |
|
christopherferreira9
left a comment
There was a problem hiding this comment.
Looks good for QA
|
✅ E2E Fixture Validation — Schema is up to date |




Description
This work is part of removing the tokensChainsCache entirely
The useERC20Tokens hook was the sole internal consumer of selectTokenListArray and was only called in useDisplayName. I have updated the hook to resolve this metadata using the /assets/v3 endpoint (which caches data and is very performant)
Changelog
CHANGELOG entry: modified useERC20Tokens to make an API call instead of reading from the cache
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2954
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-03-20.at.13.48.52.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Introduces a new client-side token-metadata fetch/caching layer and shifts
useERC20Tokensfrom Redux cache reads to network-backed data, which could affect confirmations display names/images and add runtime dependency on the tokens API.Overview
Updates
useERC20Tokensto stop reading ERC-20 metadata fromtokensChainsCacheand instead resolve names/symbols/icons via a newuseTokensDatahook backed by the tokens APIv3/assetsendpoint (using CAIP-19 asset IDs).Adds
buildEvmCaip19AssetIdfor consistent lowercased asset ID construction, plus a batched/deduped module-level cache inuseTokensData(25 IDs per request, shared in-flight promises). Tests are rewritten/added accordingly, CODEOWNERS is updated for the new hook, and E2E token API mocks now include the new v3 endpoint.Written by Cursor Bugbot for commit 4d2eace. This will update automatically on new commits. Configure here.