Skip to content

feat: init new assets controller package#25957

Merged
salimtb merged 21 commits intomainfrom
feat/init-new-assets-controller-package
Feb 12, 2026
Merged

feat: init new assets controller package#25957
salimtb merged 21 commits intomainfrom
feat/init-new-assets-controller-package

Conversation

@salimtb
Copy link
Copy Markdown
Contributor

@salimtb salimtb commented Feb 11, 2026

Description

init the new assets controller under a feature flag

Changelog

CHANGELOG entry: init the new assets controller under a feature flag

Related issues

Fixes:

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

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

Medium Risk
Introduces a new core Engine controller and messaging surface area, which can affect persisted state shape and background state change handling even though runtime behavior is gated behind a remote feature flag.

Overview
Initializes and registers the new AssetsController (from @metamask/assets-controller) in the Engine, including adding it to controller init lists, Engine context/state export, and background stateChange event tracking.

Adds assetsControllerInit plus a dedicated messenger pair (AssetsController + AssetsControllerInit) that wires required actions/events and gates activation via the assetsUnifyState remote feature flag (version-checked), while also providing an API platform client (bearer token) and token-detection preference into the controller.

Updates test fixtures/snapshots and API-mocking defaults to include the new controller’s initial state and an additional v2/supportedNetworks response; also cleans up a Login test to use DeepPartial for mocked Redux state.

Written by Cursor Bugbot for commit a998149. This will update automatically on new commits. Configure here.

@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.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask/​assets-controller@​1.0.0751007992100

View full report

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 11, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • npm/@metamask/assets-controller@1.0.0

View full report

@salimtb salimtb force-pushed the feat/init-new-assets-controller-package branch from a16dfc2 to 99fd2ea Compare February 11, 2026 23:21
@salimtb
Copy link
Copy Markdown
Contributor Author

salimtb commented Feb 11, 2026

@SocketSecurity ignore npm/@metamask/assets-controller@1.0.0

Research / rationale (per MetaMask reviewing guidelines):

  • Package: Official MetaMask package (@metamask/assets-controller), part of the MetaMask controller stack used in mobile and extension.
  • Alert: Network access via globalThis["fetch"] in this package.
  • Review: This controller is responsible for asset/token state (tokens, balances, metadata). Network access is functionally required for:
    • Fetching token lists (e.g. from community/maintained lists).
    • Resolving token/metadata (e.g. IPFS or HTTP URLs).
    • Any future price or discovery APIs the controller may call.
  • Conclusion: Network use is intentional and legitimate for an assets controller. Risk is accepted for this package in this PR. No ignore-all; this is a single-package ignore with documented rationale.

@salimtb salimtb marked this pull request as ready for review February 12, 2026 11:21
@salimtb salimtb requested review from a team as code owners February 12, 2026 11:21
Copy link
Copy Markdown

@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.

@salimtb salimtb marked this pull request as draft February 12, 2026 15:49
@salimtb salimtb marked this pull request as ready for review February 12, 2026 18:40
@salimtb salimtb requested a review from a team as a code owner February 12, 2026 18:40
Copy link
Copy Markdown
Contributor

@vinnyhoward vinnyhoward left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Platform LGTM

@salimtb salimtb enabled auto-merge February 12, 2026 20:56
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, FlaskBuildTests
  • 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. Running all tests.

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

View GitHub Actions results

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.14%. Comparing base (8930bc1) to head (a998149).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...ollers/assets-controller/assets-controller-init.ts 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #25957    +/-   ##
========================================
  Coverage   81.14%   81.14%            
========================================
  Files        4390     4394     +4     
  Lines      113425   113566   +141     
  Branches    24383    24427    +44     
========================================
+ Hits        92035    92154   +119     
- Misses      15000    15011    +11     
- Partials     6390     6401    +11     

☔ 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.

@sonarqubecloud
Copy link
Copy Markdown

@salimtb salimtb added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 9e075f9 Feb 12, 2026
186 of 188 checks passed
@salimtb salimtb deleted the feat/init-new-assets-controller-package branch February 12, 2026 22:36
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-L team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants