fix(assets-controller): seed native balances after account refresh - #9388
Merged
Conversation
Zero-balancing for new accounts ran before getAssets on account-tree changes, so assetsBalance was often never populated for the new account. Seed native zero balances using the refreshed account list after the fetch.
This was referenced Jul 5, 2026
Merged
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 d0d117f. Configure here.
Prithpal-Sooriya
approved these changes
Jul 6, 2026
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
pull Bot
pushed a commit
to Reality2byte/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
7 tasks
vpintorico
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
… ASSETS-3385 (#44218) - chore: bump assets controller to v10.0.0 ASSETS-3385 (#44055) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> [d063aa9](d063aa9) Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github Bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** core PR patch: MetaMask/core#9388 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: bump assets controller to v10.0.0 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ### popular network swap https://github.com/user-attachments/assets/44895602-2b45-43d4-bee0-1d0bcf3ee33c ### max send https://github.com/user-attachments/assets/bb3534a3-bbb9-45c8-a161-dce6cfda3afd ### import account assets https://github.com/user-attachments/assets/f79fee5e-6491-4534-827b-22cb607fbbd9 ### newly added account balance https://github.com/user-attachments/assets/0e03986d-d525-4345-a05a-9019625d1e03 ### custom network balance detection https://github.com/user-attachments/assets/10dde12f-2e26-4732-8911-d890d2772082 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches wallet balance fetching, account-tree refresh, and many controller/event integrations; incorrect messenger wiring or the vendored patch could cause missing or stale balances across networks and accounts. > > **Overview** > Upgrades **`@metamask/assets-controller`** to **10.0.1** (with **`@metamask/core-backend` ^6.4.0**), drops the **8.0.1 / 8.3.2** Yarn patches, and carries a **new 10.0.1 patch** that fetches assets on **all enabled chains** when **new accounts** join the tree (via `_runAccountTreeRefresh` / `newAccounts`). > > **AssetsController** messenger wiring is expanded for **core#9388**: extra **BackendWebSocket** channel callbacks, **`AccountTreeController:stateChanged`**, **`NetworkEnablementController:stateChanged`**, **`NetworkController:networkDidChange`**, and **`AccountActivityService:balanceUpdated`** so RPC/custom-network and post-tx balance paths work on v10. Init messenger tests now assert the full delegated action/event lists; init expects **`OnboardingController:getState`**. > > **LavaMoat** policies are refreshed for the new dependency graph (direct **`@metamask/assets-controllers`**, **`@tanstack/query-core`** paths, **`document.visibilityState`** overrides). E2E hardware-wallet fixtures use a shared **localhost native ETH** human balance constant aligned with seeded wei. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfc4d31. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
7 tasks
This was referenced Jul 8, 2026
pull Bot
pushed a commit
to Eric-Johnson-1/metamask-extension
that referenced
this pull request
Jul 8, 2026
) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## **Description** Bumps `@metamask/assets-controller` from the patched `10.0.1` to `^10.1.0` ([changelog](https://github.com/MetaMask/core/blob/main/packages/assets-controller/CHANGELOG.md#1010)). Notable changes in `10.1.0`: - **Fixed**: Fetch balances when switching account groups, enabling RPC-only networks, or after a new account is added to the account tree ([core#9388](MetaMask/core#9388)). This release contains the exact fix that was previously applied via the local yarn patch (`@metamask-assets-controller-npm-10.0.1-d3c86d8983.patch`), so this PR stops using the patch in `package.json` resolutions/dependencies. The patch file itself is intentionally left in `.yarn/patches/` (removing it would require an additional codeowner review); it is no longer referenced by the install. - **Added**: temporary `tempMigrateAssetsInfoMetadataAssets3346` constructor option ([core#9393](MetaMask/core#9393)). Wiring this option up is intentionally **not** done here and will be a fast-follow in a separate PR. - **Changed**: `@metamask/messenger` bumped from `^1.2.0` to `^2.0.0` ([core#9392](MetaMask/core#9392)). No action needed here anymore: `main` has since migrated the app to messenger v2, so after merging `main` into this branch everything dedupes onto a single `@metamask/messenger@2.0.0` copy. Also updates the `@metamask/assets-controller@npm:^9.1.0` resolution (needed for `@metamask/transaction-pay-controller`'s transitive request) to point at `^10.1.0` instead of the patch. The previous `@npm:^10.0.1` resolution entry is removed because `^10.0.1` now naturally resolves to `10.1.0`. `yarn lavamoat:auto`, `yarn allow-scripts auto`, and `yarn lint:lockfile:dedupe:fix` were run — no policy or allow-scripts changes were produced. `yarn attributions:generate` produced only unrelated stale-file churn, so attribution updates are left to `@metamaskbot update-attributions` if required. ## **Changelog** CHANGELOG entry: null ## **Related issues** Related to: MetaMask/core#9388, MetaMask/core#9392 ## **Manual testing steps** 1. Run the extension and unlock the wallet. 2. Go to the homepage asset list. 3. Add a new account to an account group and switch account groups. 4. Verify balances populate for the new account, including on custom/RPC-only networks. 5. Enable an RPC-only network (e.g. a custom chain) and verify token balances are fetched. <!-- ## **Screenshots/Recordings** ### **Before** ### **After** --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-e5245e2b-5547-4357-8a2c-94466489dd60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-e5245e2b-5547-4357-8a2c-94466489dd60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
pull Bot
pushed a commit
to Reality2byte/metamask-mobile
that referenced
this pull request
Jul 8, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## **Description** Bumps `@metamask/assets-controller` from the patched `10.0.1` to `^10.1.0` ([changelog](https://github.com/MetaMask/core/blob/main/packages/assets-controller/CHANGELOG.md#1010)). Notable changes in `10.1.0`: - **Fixed**: Fetch balances when switching account groups, enabling RPC-only networks, or after a new account is added to the account tree ([core#9388](MetaMask/core#9388)). This release contains the exact fix that was previously applied via the local yarn patch (`@metamask-assets-controller-npm-10.0.1-d3c86d8983.patch`), so this PR stops using the patch in `package.json` resolutions/dependencies. The patch file itself is intentionally left in `.yarn/patches/` (removing it would require an additional codeowner review); it is no longer referenced by the install. - **Added**: temporary `tempMigrateAssetsInfoMetadataAssets3346` constructor option ([core#9393](MetaMask/core#9393)). Wiring this option up is intentionally **not** done here and will be a fast-follow in a separate PR. - **Changed**: `@metamask/messenger` bumped from `^1.2.0` to `^2.0.0` ([core#9392](MetaMask/core#9392)). No change needed here: the existing blanket `"@metamask/messenger": "^1.2.0"` resolution keeps a single deduped messenger copy (`1.2.0`) for the whole app. `@metamask/assets-controller@10.1.0` does not use any messenger v2-only APIs (`buildChild`, `getRegisteredActionTypes`), so this is safe at runtime. Validated with `yarn setup:expo`, `yarn lint:tsc` (zero errors), and the assets-controller unit tests (`assets-controller-init.test.ts`, `assets-controller.test.ts` — 30 passed). ## **Changelog** CHANGELOG entry: null ## **Related issues** Refs: MetaMask/core#9388 ## **Manual testing steps** ```gherkin Feature: unified assets balances (AssetsController) Scenario: user adds a new account to the account tree Given the wallet is unlocked with an existing account group When user creates or imports a new account Then balances for the new account are fetched and displayed, including on custom/RPC-only networks Scenario: user enables an RPC-only network Given the wallet is unlocked When user enables a custom RPC network Then token balances on that network are fetched without requiring an app restart ``` ## **Screenshots/Recordings** N/A — dependency bump only, no UI changes. ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### 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](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **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. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-e5245e2b-5547-4357-8a2c-94466489dd60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-e5245e2b-5547-4357-8a2c-94466489dd60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Zero-balancing for new accounts ran before getAssets on account-tree changes, so assetsBalance was often never populated for the new account. Seed native zero balances using the refreshed account list after the fetch.
assetsBalancefor newly added accounts on custom/RPC networks (e.g. DXC /eip155:50) whereassetsInfowas present but balances were not fetchedExplanation
References
Checklist
Note
Medium Risk
Changes balance refresh timing in
AssetsControllerfor account-tree and subscription flows; localized but affects wallet balance display on custom/RPC networks.Overview
Fixes cases where
assetsBalancestayed empty for new or RPC-only-network accounts even when metadata was present, by tightening whenAssetsControllerforce-refreshes balances.On account tree updates, the controller now tracks newly added accounts and, after the usual group-wide
getAssetsand re-subscribe, runs a second forced fetch scoped to those new accounts so the slow/RPC pipeline can populate balances (e.g. custom chains likeeip155:50).Documents the same class of fix for account group switches and newly enabled RPC-only networks in the changelog.
#handleEnabledNetworksChangedonly refactors to reuse a localaccountsvariable when fetching added chains—behavior unchanged.Reviewed by Cursor Bugbot for commit 8e87933. Bugbot is set up for automated code reviews on this repo. Configure here.