-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: update assets controllers #21465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
## 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 -->
## 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 -->
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!



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
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Account tracker messenger now listens to transaction events; upgraded
@metamask/assets-controllers,@metamask/bridge-controller, and@metamask/bridge-status-controllerto latest majors.AccountTrackerControllermessenger: allow and subscribe toTransactionController:transactionConfirmedandTransactionController:unapprovedTransactionAddedevents.@metamask/assets-controllersto^82.0.0.@metamask/bridge-controllerto^54.0.0.@metamask/bridge-status-controllerto^54.0.0.Written by Cursor Bugbot for commit 658b12f. This will update automatically on new commits. Configure here.