Skip to content

fix(assets-controller): seed native balances after account refresh - #9388

Merged
salimtb merged 5 commits into
mainfrom
fix/seed-native-metadata-new-account
Jul 6, 2026
Merged

fix(assets-controller): seed native balances after account refresh#9388
salimtb merged 5 commits into
mainfrom
fix/seed-native-metadata-new-account

Conversation

@salimtb

@salimtb salimtb commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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.

  • Fetch balances via RpcDataSource when a user switches EVM accounts, enables RPC-only networks, switches account groups, or adds a new account to the account tree
  • Fixes missing assetsBalance for newly added accounts on custom/RPC networks (e.g. DXC / eip155:50) where assetsInfo was present but balances were not fetched

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes balance refresh timing in AssetsController for account-tree and subscription flows; localized but affects wallet balance display on custom/RPC networks.

Overview
Fixes cases where assetsBalance stayed empty for new or RPC-only-network accounts even when metadata was present, by tightening when AssetsController force-refreshes balances.

On account tree updates, the controller now tracks newly added accounts and, after the usual group-wide getAssets and re-subscribe, runs a second forced fetch scoped to those new accounts so the slow/RPC pipeline can populate balances (e.g. custom chains like eip155:50).

Documents the same class of fix for account group switches and newly enabled RPC-only networks in the changelog. #handleEnabledNetworksChanged only refactors to reuse a local accounts variable 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.

salimtb added 2 commits July 4, 2026 12:57
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.
@salimtb
salimtb marked this pull request as ready for review July 4, 2026 11:10
@salimtb
salimtb requested review from a team as code owners July 4, 2026 11:10
@salimtb
salimtb temporarily deployed to default-branch July 4, 2026 11:10 — with GitHub Actions Inactive
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated
Comment thread packages/assets-controller/src/AssetsController.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Fix All in Cursor

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

Comment thread packages/assets-controller/src/AssetsController.ts
@salimtb
salimtb requested a review from Prithpal-Sooriya July 6, 2026 10:23
@salimtb
salimtb added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit 7c13b25 Jul 6, 2026
413 of 414 checks passed
@salimtb
salimtb deleted the fix/seed-native-metadata-new-account branch July 6, 2026 10:54
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>
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>
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>&nbsp;<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>&nbsp;</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>&nbsp;<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>&nbsp;</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants