Skip to content

Conversation

@bergarces
Copy link
Contributor

@bergarces bergarces commented Oct 21, 2025

Description

This PR just adds functionality to AccountTrackerController and applies new breaking changes.

Changelog

CHANGELOG entry: Added evm native balance updates on transaction events

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1368

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Account tracker messenger now listens to transaction events; upgraded @metamask/assets-controllers, @metamask/bridge-controller, and @metamask/bridge-status-controller to latest majors.

  • Engine
    • AccountTrackerController messenger: allow and subscribe to TransactionController:transactionConfirmed and TransactionController:unapprovedTransactionAdded events.
  • Dependencies
    • Upgrade @metamask/assets-controllers to ^82.0.0.
    • Upgrade @metamask/bridge-controller to ^54.0.0.
    • Upgrade @metamask/bridge-status-controller to ^54.0.0.

Written by Cursor Bugbot for commit 658b12f. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@socket-security
Copy link

socket-security bot commented Oct 21, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​bridge-status-controller@​53.0.0 ⏵ 54.0.0991007898 +1100
Updatednpm/​@​metamask/​bridge-controller@​53.1.0 ⏵ 54.0.0981007898100
Updatednpm/​@​metamask/​assets-controllers@​81.0.1 ⏵ 82.0.098 +110091 +198100

View full report

@bergarces bergarces requested a review from a team as a code owner October 21, 2025 12:00
@bergarces bergarces changed the title fix: update preview package fix: update assets controllers Oct 21, 2025
@github-actions github-actions bot added size-S and removed size-XS labels Oct 21, 2025
@bergarces bergarces added the DO-NOT-MERGE Pull requests that should not be merged label Oct 21, 2025
bergarces added a commit to MetaMask/core that referenced this pull request Oct 21, 2025
## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

Adds single address balance refresh based on transaction events to make
up for removing them on extension client side during migration.

Previews:
MetaMask/metamask-extension#36808
MetaMask/metamask-mobile#21465

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

* Related to https://consensyssoftware.atlassian.net/browse/ASSETS-1368

## Checklist

- [X] I've updated the test suite for new or updated code as appropriate
- [X] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [X] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [X] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> AccountTrackerController now listens to transaction events to refresh
the originating address balance, with internal refresh refactor, tests,
and changelog updates.
> 
> - **AccountTrackerController**:
> - **New listeners**: Subscribes to
`TransactionController:unapprovedTransactionAdded` and
`TransactionController:transactionConfirmed` to refresh the
`txParams.from` address balance.
> - **Refactor**: Extracts `#refreshAccounts` and `#refreshAddress`;
`refresh` delegates to these helpers.
> - **Types/Events**: Extends `AllowedEvents` to include the above
transaction events; imports `TransactionStatus`/`TransactionMeta`.
> - **Tests**:
> - Add cases ensuring balances refresh on unapproved and confirmed
transaction events.
> - Expand test messenger `allowedEvents`; expose `messenger` from test
harness.
> - **Changelog**:
> - Notes BREAKING requirement to allow new transaction events in the
controller messenger.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8504447. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@bergarces bergarces mentioned this pull request Oct 21, 2025
4 tasks
bergarces added a commit to MetaMask/core that referenced this pull request Oct 21, 2025
## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

Assets controller major release.

Preview PRs:
MetaMask/metamask-mobile#21465
MetaMask/metamask-extension#36808

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Releases core 632 with @metamask/assets-controllers v82 (breaking
event listeners, multicall additions, Snap request batching) and aligns
bridge packages with breaking peer bumps.
> 
> - **Packages**:
>   - `@metamask/assets-controllers@82.0.0`:
> - **BREAKING:** Add balance refresh listeners for
`TransactionControllerUnapprovedTransactionAddedEvent` and
`TransactionControllerTransactionConfirmedEvent`.
> - Add multicall addresses for additional chains; batch
`OnAssetConversion` and `OnAssetsMarketData` requests to non‑EVM Snaps.
>   - `@metamask/bridge-controller@54.0.0`:
> - **BREAKING:** Bump peer `@metamask/assets-controllers` to `^82.0.0`.
>   - `@metamask/bridge-status-controller@54.0.0`:
> - **BREAKING:** Bump peer `@metamask/bridge-controller` to `^54.0.0`.
> - **Repo**: Bump monorepo version to `632.0.0` and update lockfile.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
45f4843. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@bergarces bergarces removed the DO-NOT-MERGE Pull requests that should not be merged label Oct 22, 2025
@sonarqubecloud
Copy link

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt Gudahtt added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit dad51ed Oct 22, 2025
93 checks passed
@Gudahtt Gudahtt deleted the update-assets-controllers branch October 22, 2025 21:09
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants