chore: remove allDetectedTokens assets references#30242
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| [chainId], | ||
| ); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
This is not doing anything. Those arrays of detected tokens are always empty. Adding tokens to TokensController occurs at controller level.
There was a problem hiding this comment.
These components look like dead code.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8c3a204. Configure here.
There was a problem hiding this comment.
This is not how tokens get automatically imported anymore. It hasn't been for quite a while.
|
@metamaskbot update-mobile-fixture |
|
🔄 Fixture update started. Running workflow from branch |
|
❌ E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use |
|
@metamaskbot update-mobile-fixture |
|
🔄 Fixture update started. Running workflow from branch |
|
❌ E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use |
1 similar comment
|
❌ E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why SmokeWalletPlatform: The Wallet view (index.tsx) had significant logic removed (auto-import useEffect, multiple selectors). This is the core wallet home screen and needs validation that it still renders correctly and doesn't break with the removed logic. Why SmokeNetworkAbstractions: Token detection is network-aware (per-chain token detection). The removal of multi-network token detection logic and the network-related selectors from the wallet view warrants validation of network-related token display. Not selecting SmokeConfirmations: The removed code was about token detection/import, not transaction confirmations. Not selecting all tags: The changes are focused removals of deprecated code. The deleted E2E test was the only test using Performance Test Selection: |
|




Description
allDetectedTokenshas been deprecated and empty for a long time. We are now removing all remaining references to that piece of state since we are in the process of deprecating many assets controllers.This should not have any effect in the app, as the content of that piece of state is always empty.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3197
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Removes navigation routes, UI screens, and selector logic for the detected-tokens import flow; if any remaining code paths still navigate to these screens or depend on
allDetectedTokens, it could cause runtime navigation errors despite the state being deprecated.Overview
Removes the deprecated Detected Tokens UI/flows: deletes the
DetectedTokensandDetectedTokensConfirmationscreens (and theTokenrow component), unregisters the modal route fromApp.tsxandRoutes.ts, and strips the associated mocks/tests.Eliminates remaining
allDetectedTokens/detected-token selector plumbing by deletingselectDetectedTokensand the detected-token flattening selectors fromtokensController.ts, plus removing related fixture/test helpers and references in Wallet tests (including the auto-import side effect coverage).Reviewed by Cursor Bugbot for commit 45e7a76. Bugbot is set up for automated code reviews on this repo. Configure here.