Skip to content

chore: bump assets-controller to ^20.2.2, assets-controllers to ^113.1.1 and core-backend to ^14.0.0 - #38819

Merged
Prithpal-Sooriya merged 6 commits into
mainfrom
chore/bump-assets-controllers-1382.0.0
Nov 5, 2026
Merged

Prithpal-Sooriya merged 6 commits into
mainfrom
chore/bump-assets-controllers-1382.0.0

Conversation

@maxime-oe

@maxime-oe maxime-oe commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Bumps @metamask/assets-controller to ^20.2.2, @metamask/assets-controllers to ^113.1.1 and @metamask/core-backend to ^14.0.0. These are released in MetaMask/core#11300.

Why: the launchpad spam check in assets-controller 20.2.x calls apiClient.token.fetchV2Assets(...). Only core-backend 14.0.0 has that method; the 13.x line lacks it. On 13.x, the spam-token cleanup at unlock throws a TypeError and removes no spam tokens. assets-controller 20.2.2 requires core-backend ^14.0.0, which fixes this.

OHLCV handling: core-backend 14 is breaking for OHLCVService. Its default channel namespace changes from market-data.v1 to ohlcv.v1. Mobile's clients still match market-data.v1.* channel strings:

  • useOHLCVRealtime (charts)
  • useLiveTokenFiatRate (bridge live rates)
  • SocialLivePricesProvider (social spot prices)

To keep live updates working, app/core/Engine/controllers/core-backend/ohlcv-service-init.ts now passes subscriptionNamespace: 'market-data.v1', with a unit test.

Ordering with #38739 (moves clients to ohlcv.v1): that PR should merge after this one or together with it, never before. On core-backend 13 the service only emits market-data.v1. When it lands, it should drop the subscriptionNamespace option (or set it to 'ohlcv.v1') and update ohlcv-service-init.test.ts.

The lockfile changes are limited to these 3 packages. @metamask/client-utils 3.1.1 is not bumped because the fix doesn't need it. The existing core-backend 11/13 copies used by client-utils, social-controllers and transaction-controller are unchanged from main.

Changelog

CHANGELOG entry: Fixed spam token cleanup on unlock, which failed to remove launchpad spam tokens

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WPN-2427?atlOrigin=eyJpIjoiYjE1YzRlMTU3N2M1NGM2MTgzNTZmYTZkYmIxZmIzYTEiLCJwIjoiaiJ9

Manual testing steps

Feature: launchpad spam token cleanup and live prices

  Scenario: user unlocks a wallet holding launchpad spam tokens
    Given the wallet holds tokens flagged as launchpad spam
    When user unlocks the app
    Then no fetchV2Assets TypeError is logged and the spam tokens are removed from the token list

  Scenario: user opens a token chart
    Given the user is on a token details page with the advanced chart
    When the chart is open for a minute
    Then the latest candle keeps updating in real time

Screenshots/Recordings

Before

N/A (dependency bump, no UI change)

After

N/A

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

Medium Risk
Touches unlock token cleanup and real-time market-data subscriptions via a major core-backend bump; behavior is intentionally pinned to the old OHLCV namespace until client migration lands.

Overview
Upgrades @metamask/core-backend to ^14.0.0 and aligned @metamask/assets-controller / @metamask/assets-controllers patch releases so unlock-time launchpad spam cleanup can call fetchV2Assets (missing on core-backend 13, which caused a TypeError and skipped spam removal).

Because core-backend 14 changes OHLCVService’s default subscription namespace to ohlcv.v1, ohlcv-service-init.ts now passes subscriptionNamespace: 'market-data.v1' so existing chart, bridge, and social live-price subscribers keep receiving updates until a follow-up PR switches clients to ohlcv.v1. A unit test asserts that wiring.

E2E defaults add a mock for the token API v2 /assets requests used by the new launchpad spam check (empty 200 response).

Reviewed by Cursor Bugbot for commit 4109dc9. Bugbot is set up for automated code reviews on this repo. Configure here.

…13.1.0

Also bump @metamask/core-backend to ^13.0.0 to match the version
required by the new assets controller releases, and add the new
NftDetectionController:detectNfts action to the Engine types.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 4, 2026

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.

@metamask-ci

metamask-ci Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@socket-security

socket-security Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​assets-controller@​20.2.0 ⏵ 20.2.298 +110080 +1100 +1100
Updatednpm/​@​metamask/​assets-controllers@​113.1.0 ⏵ 113.1.198 +110091100 +1100
Addednpm/​@​metamask/​core-backend@​14.0.09910010099100

View full report

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: ALL

AI Confidence: 100

E2E reasoning

Expand to read

The PR contains several changes that justify running all smoke tests:

  1. @metamask/core-backend major version bump (13→14): This is the most significant change. The new version changes the default OHLCV subscription namespace to ohlcv.v1, which the code explicitly overrides to market-data.v1 for backward compatibility. A major version bump in a core backend package can have wide-ranging effects on market data, charts, bridge live rates, and social spot prices — impacting SmokeSwap, SmokeWalletPlatform, SmokeConfirmations, and potentially others.

  2. @metamask/assets-controller patch bumps (20.2.0→20.2.2, 113.1.0→113.1.1): These patch bumps to the assets controller affect token/asset management across the app. The new default API mock for v2/assets endpoint (launchpad spam check) was added specifically to support changes in these versions.

  3. New default E2E mock in token-apis.ts: The addition of a mock for token.api.cx.metamask.io/v2/assets affects the default mock infrastructure used across all E2E tests. This mock is applied globally (in defaults/) and could affect any test that relies on token API responses, including wallet unlock behavior (launchpad spam check).

  4. ohlcv-service-init.ts configuration change: The subscriptionNamespace: 'market-data.v1' addition ensures the OHLCV service continues to use the correct channel for charts, bridge live rates, and social spot prices. If this were misconfigured, swap/bridge quote flows and wallet charts would break.

The hard rule seed (controller-version-update) already mandated ALL tags. The analysis confirms this is appropriate: the major core-backend version bump has broad blast radius across market data features, and the new default mock infrastructure change affects all E2E tests globally.

View run

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@maxime-oe maxime-oe changed the title chore: bump assets-controller to ^20.2.0 and assets-controllers to ^13.1.0 chore: bump assets-controller to ^20.2.1 and assets-controllers to ^13.1.0 Nov 4, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size-XS and removed size-S labels Nov 4, 2026
@maxime-oe
maxime-oe marked this pull request as ready for review November 4, 2026 15:25
@maxime-oe maxime-oe changed the title chore: bump assets-controller to ^20.2.1 and assets-controllers to ^13.1.0 chore: bump assets-controller to ^20.2.1 Nov 4, 2026
@Prithpal-Sooriya
Prithpal-Sooriya added this pull request to the merge queue Nov 4, 2026
@maxime-oe
maxime-oe removed this pull request from the merge queue due to a manual request Nov 4, 2026
…sets-controllers to ^113.1.1

Keep OHLCVService on the market-data.v1 namespace, since core-backend 14
defaults to ohlcv.v1 and client channel matching still uses market-data.v1.
@Prithpal-Sooriya

Prithpal-Sooriya commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🤖 I pushed 2 commits to move this PR to the releases from MetaMask/core#11300:

  • Bumped @metamask/assets-controller ^20.2.1 → ^20.2.2, @metamask/core-backend ^13.0.0 → ^14.0.0 and @metamask/assets-controllers ^113.1.0 → ^113.1.1. Ran yarn dedupe; --check is clean.
    • Why: assets-controller 20.2.1's launchpad spam check calls apiClient.token.fetchV2Assets, which doesn't exist in core-backend 13.x. The unlock cleanup throws a TypeError and removes no spam tokens.
    • client-utils 3.1.1 is not bumped: it isn't needed for this fix, and it would pull in transaction-controller ^73.1.1. The pre-existing core-backend 11/13 copies (client-utils, social-controllers, transaction-controller) are unchanged from main.
  • core-backend 14 is breaking for OHLCVService: its default channel namespace is now ohlcv.v1. Mobile's clients still match market-data.v1.* channel strings (useOHLCVRealtime, useLiveTokenFiatRate, SocialLivePricesProvider). Without a fix, charts, bridge live rates and social spot prices would get no updates.
  • Checks:
    • yarn lint:tsc: only the known termsOfUseContent generated-file errors, which main has too.
    • Unit tests: 81 suites / 1240 tests pass across assets-controller, core-backend and OHLCV consumers.
  • Adverse review: SHIP-WITH-CAVEATS (3/3 ship, 0 critical, 2 warnings).

@Prithpal-Sooriya Prithpal-Sooriya changed the title chore: bump assets-controller to ^20.2.1 chore: bump assets-controller to ^20.2.2, assets-controllers to ^113.1.1 and core-backend to ^14.0.0 Nov 4, 2026
// client channel matching (charts, bridge live rates, social spot prices)
// moves to `ohlcv.v1`. Remove together with that switch:
// https://github.com/MetaMask/metamask-mobile/pull/38739
subscriptionNamespace: 'market-data.v1',

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.

I'll literally remove this on the next PR - so its okay for now.

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@Prithpal-Sooriya

Copy link
Copy Markdown
Contributor

🤖 CI fix: the Appium smoke failures (SmokeConfirmations, SmokeNetworkAbstractions, SmokeStake, SmokeWalletPlatform) were cleanup errors from an unmocked GET token.api.cx.metamask.io/v2/assets?...&includeLaunchpadData=true&includeTokenSecurityData=true. That is the new launchpad spam check in assets-controller 20.2.2. Commit 4109dc9 adds a default [] mock for it in tests/api-mocking/mock-responses/defaults/token-apis.ts. The Component view tests (5) failure (PredictEntryActions, "unmounted component") and the SmokePredictions failures (element not visible) were flakes: no unmocked requests, they pass on main, and they pass locally. All checks are green on 4109dc9.

// tokens, so nothing extra is flagged as spam.
// e.g. https://token.api.cx.metamask.io/v2/assets?assetIds=eip155:1/erc20:0x...&includeLaunchpadData=true&includeTokenSecurityData=true
const tokenV2AssetsRegex =
/^https:\/\/token\.api\.cx\.metamask\.io\/v2\/assets\?.*$/;

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.

yep intentional - we are using /v2/assets endpoint as part of our internal cleanup scripts.

@Prithpal-Sooriya
Prithpal-Sooriya added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 2e2a11d Nov 5, 2026
133 of 135 checks passed
@Prithpal-Sooriya
Prithpal-Sooriya deleted the chore/bump-assets-controllers-1382.0.0 branch November 5, 2026 09:33
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026
@metamask-ci metamask-ci Bot added the release-8.20.0 Issue or pull request that will be included in release 8.20.0 label Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.20.0 Issue or pull request that will be included in release 8.20.0 size-S team-emerging-opportunities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants