Skip to content

chore: remove allDetectedTokens Card references#30236

Merged
bergarces merged 1 commit into
mainfrom
all-detected-tokens-card-references
May 15, 2026
Merged

chore: remove allDetectedTokens Card references#30236
bergarces merged 1 commit into
mainfrom
all-detected-tokens-card-references

Conversation

@bergarces

@bergarces bergarces commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

allDetectedTokens has 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

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@bergarces bergarces requested a review from a team as a code owner May 15, 2026 11:07
@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are tightly scoped to app/components/UI/Card/hooks/useAssetBalances.tsx and its test file. The modification removes the allDetectedTokens selector from TokensController state and the associated fallback lookup logic. This means the Card's asset balance hook no longer searches auto-detected tokens when resolving asset metadata — it only uses explicitly added tokens (allTokens). The hook is consumed by useCardHomeData.ts, which powers the MetaMask Card home screen. This is a behavioral change in the Card feature only. No shared components (navigation, confirmations, Engine, controllers) are affected. SmokeMoney covers Card home screen, Add Funds flows, and card-related E2E tests, making it the correct and sufficient tag. No dependent tags are required since the change doesn't touch swap confirmations or wallet platform features directly.

Performance Test Selection:
The change removes a Redux selector and a loop over detected tokens, which is a minor simplification. The Card feature's asset balance hook is not a performance-critical path measured by any performance test suite. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@bergarces bergarces enabled auto-merge May 15, 2026 12:33
@bergarces bergarces added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit c901518 May 15, 2026
114 of 118 checks passed
@bergarces bergarces deleted the all-detected-tokens-card-references branch May 15, 2026 14:55
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants