Skip to content

[ON HOLD] feat: remove globally mounted useEnsureMusdTokenRegistered in favour of @metamask/assets-controllers automatic mUSD tracking#29622

Open
Matt561 wants to merge 6 commits intomainfrom
chore/bump-assets-controller-and-assets-controllers-packages
Open

[ON HOLD] feat: remove globally mounted useEnsureMusdTokenRegistered in favour of @metamask/assets-controllers automatic mUSD tracking#29622
Matt561 wants to merge 6 commits intomainfrom
chore/bump-assets-controller-and-assets-controllers-packages

Conversation

@Matt561
Copy link
Copy Markdown
Contributor

@Matt561 Matt561 commented May 1, 2026

DO NOT MERGE - These changes lead to missing mUSD asset icons.

Description

This PR removes the globally mounted useEnsureMusdTokenRegistered() since the @metamask/assets-controllers now auto-track mUSD.

Changes:

  • bumped @metamask/assets-controller to ^6.3.0
  • bumped @metamask/assets-controllers to ^105.1.0
  • Removed globally mounted useEnsureMusdTokenRegistered
  • Removed ensureMusdTokenRegistered

Changelog

CHANGELOG entry: removed globally mounted useEnsureMusdTokenRegistered; bumped @metamask/assets-controller to ^6.3.0; bumped @metamask/assets-controllers to ^105.1.0.

Related issues

Fixes:

Manual testing steps

Feature: Automatic mUSD tracking on mainnet, Linea, and Monad

  Scenario: mUSD automatically tracked
    Given user onboards a new wallet that doesn't have mUSD

    When user opens app
    Then mUSD is tracked by default

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.

Note

Cursor Bugbot is generating a summary for commit 400616a. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

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 github-actions Bot added the size-L label May 1, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 1, 2026

@Matt561 Matt561 changed the title chore/bump assets controller and assets controllers packages feat: remove globally mounted useEnsureMusdTokenRegistered in favour of @metamask/assets-controllers automatic mUSD tracking May 1, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.79%. Comparing base (51b6bbd) to head (d755890).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #29622       +/-   ##
===========================================
- Coverage   82.15%   61.79%   -20.37%     
===========================================
  Files        5178     5225       +47     
  Lines      137450   138558     +1108     
  Branches    31079    31452      +373     
===========================================
- Hits       112924    85616    -27308     
- Misses      16875    46232    +29357     
+ Partials     7651     6710      -941     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Matt561 Matt561 marked this pull request as ready for review May 1, 2026 19:10
@Matt561 Matt561 requested review from a team as code owners May 1, 2026 19:10
@Matt561 Matt561 changed the title feat: remove globally mounted useEnsureMusdTokenRegistered in favour of @metamask/assets-controllers automatic mUSD tracking [ON HOLD] feat: remove globally mounted useEnsureMusdTokenRegistered in favour of @metamask/assets-controllers automatic mUSD tracking May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/assets-controller, @metamask/assets-controllers. Running all tests.

Performance Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/assets-controller, @metamask/assets-controllers. Running all tests.

View GitHub Actions results

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 400616a. Configure here.

CHAIN_IDS.LINEA_MAINNET, // Linea mainnet
];

/**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused constant and import left behind after removal

Low Severity

MUSD_TOKEN_REGISTRATION_CHAIN_IDS_FALLBACK is now dead code. Its only consumer, selectMusdTokenRegistrationChainIds, was removed in this PR, but the constant itself (along with its JSDoc) remains exported from index.ts, and the test file still imports it at line 17 without using it anywhere. Both the export and the import are unused and can be removed.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 400616a. Configure here.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 24
Missing keys 24
Type mismatches 0
Value mismatches 12 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants