Repository navigation
chore(assets): remove TokenBalancesController - #46303
Conversation
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (2 files, +2 -10)
👨🔧 @MetaMask/core-extension-ux (2 files, +2 -10)
🫰 @MetaMask/core-platform (2 files, +1 -52)
👨🔧 @MetaMask/extension-platform (3 files, +2 -53)
🕵️ @MetaMask/extension-privacy-reviewers (1 files, +0 -1)
💎 @MetaMask/metamask-assets (1 files, +0 -2)
📜 @MetaMask/policy-reviewers (8 files, +0 -56)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (3 files, +1 -5)
🔄 @MetaMask/swaps-engineers (3 files, +1 -5)
|
|
|
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. |
Builds ready [1aa0598]
⚡ Performance Benchmarks (Total: 🟢 11 pass · 🟡 10 warn · 🔴 4 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
1aa0598 to
c8fd330
Compare
c8fd330 to
4147116
Compare
4147116 to
34655d7
Compare
34655d7 to
e074ebb
Compare
e074ebb to
7cb8176
Compare
Builds ready [9bc118f]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
21a53cb to
337fb1c
Compare
Builds ready [360451d]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [935c75b]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 4 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [8d99710]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 1 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [676e2d6]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 4 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [df483ba] [reused from 676e2d6]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 4 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [372bd1f]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 1 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Builds ready [034ba5e]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 1 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the duplicate AssetsControllerState intersection on BridgeAppState, keep the jest unify-state flag mock stable across resetAllMocks, and align Multichain/migration selector types with AssetsController fixtures after legacy controller removal. Co-authored-by: Cursor <cursoragent@cursor.com>
Builds ready [c57ba62]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 2 warn · 🔴 3 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
|
@metamaskbot update-policies |
|
Policies updated. Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 👀 lavamoat/webpack/mv2/beta/policy.json changes differ from lavamoat/webpack/mv2/main/policy.json changes |
Builds ready [ff2c4aa]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
The legacy background API snapshot still listed TokenBalances polling methods, and oxfmt rejected the assets migration selector. Co-authored-by: Cursor <cursoragent@cursor.com>
Builds ready [826e122]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 2 warn · 🔴 3 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
Drop the stale tokenBalances state-log key, stop seeding the asset-list token before import, and refresh only the selected account so unopened account groups stay without a balance. Co-authored-by: Cursor <cursoragent@cursor.com>
Unified assets is always on, so the account list refresh no longer branches on the flag. Co-authored-by: Cursor <cursoragent@cursor.com>
Builds ready [a23ed97]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 2 warn · 🔴 2 fail)
Bundle Size Diffs [🚀 Bundle size reduced!]
|
|
ccharly
left a comment
There was a problem hiding this comment.
LGTM for accounts:
ui/components/multichain/account-overview/account-overview-eth.test.tsx
ui/components/multichain/account-overview/account-overview-non-evm.test.tsx
|
No release label on PR. Adding release label release-13.56.0 on PR, as PR was added to branch 13.56.0 when release was cut. |



Description
Stacked on #46302.
Removes
TokenBalancesControllerinitialization, messenger wiring, polling APIs, and runtime consumers. Balance refresh paths now useAssetsController, while Transaction Pay receives an AssetsController-backed compatibility state shape. Fixtures and tests no longer seed or mock the removed controller.Persisted-state cleanup is intentionally deferred to one final migration PR at the end of the controller-removal stack.
Changelog
CHANGELOG entry: null
Manual testing steps
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Stack created with GitHub Stacks CLI • Give Feedback 💬
Note
Medium Risk
Removes the dedicated EVM token balance polling/updater and shifts refresh to AssetsController; incorrect unify selectors or refresh paths could show stale or wrong balances until the rest of the stack lands.
Reviewed by Cursor Bugbot for commit a23ed97. Bugbot is set up for automated code reviews on this repo. Configure here.