feat(assets): wire isDeprecated for multichain controllers#43336
feat(assets): wire isDeprecated for multichain controllers#43336Prithpal-Sooriya wants to merge 6 commits into
Conversation
Add isDeprecated callbacks to MultichainAssetsRatesController and MultichainBalancesController initialization, driven by the assetsUnifyState remote feature flag deprecatedControllers list. Uses @metamask-previews/assets-controllers@108.5.0-preview-513faa49e from MetaMask/core#9044. Related: MetaMask/core#9044 Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 b2f9521. Configure here.
Builds ready [b2f9521]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 7 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
Builds ready [f3073b8]
⚡ Performance Benchmarks (Total: 🟢 20 pass · 🟡 5 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
When isDeprecated is true in test environments, MultichainAssetsRatesController and MultichainBalancesController clear conversionRates, historicalPrices, and balances to empty objects. Update metrics state snapshots and state-logs.json to match, following the TokenListController pattern from #43108. Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
✨ Files requiring CODEOWNER review ✨🕵️ @MetaMask/extension-privacy-reviewers (1 files, +2 -161)
🧪 @MetaMask/qa (1 files, +2 -161)
|
Builds ready [430a91c] [reused from f3073b8]
⚡ Performance Benchmarks (Total: 🟢 20 pass · 🟡 5 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Sentry maskObject reports typeof for MultichainBalancesController.balances
and MultichainAssetsRatesController rate fields, so deprecated empty state
still serializes as "object" — unlike TokenListController.tokensChainsCache
which uses an AllProperties sub-mask and snapshots as {}.
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
Builds ready [a5f6c15]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|

Description
Wires the
isDeprecatedconstructor callback forMultichainAssetsRatesControllerandMultichainBalancesControllerin the extension, following the same pattern used forTokenListControllerin #43108 and the core implementation in MetaMask/core#9044.When the
assetsUnifyStateremote feature flag lists a controller indeprecatedControllers, the callback returnstrueand the controller stops issuing Snap requests and clears its persisted state.This PR uses the preview build from core#9044:
@metamask-previews/assets-controllers@108.5.0-preview-513faa49eChangelog
CHANGELOG entry: null
Related issues
Related: MetaMask/core#9044
Manual testing steps
yarn startoryarn build:test).assetsUnifyState.deprecatedControllersincludingMultichainAssetsRatesControllerandMultichainBalancesController, verify multichain conversion rates and balances are not fetched via Snap.deprecatedControllers, verify existing multichain balance/rate behavior is unchanged.Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist