-
-
Notifications
You must be signed in to change notification settings - Fork 246
fix: enable account-tracker-controller to use latest block #6250
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
Merged
Prithpal-Sooriya
merged 6 commits into
main
from
fix/account-tracker-controller-latest-block
Aug 7, 2025
Merged
fix: enable account-tracker-controller to use latest block #6250
Prithpal-Sooriya
merged 6 commits into
main
from
fix/account-tracker-controller-latest-block
Aug 7, 2025
Conversation
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
3380fdd
to
47d6be5
Compare
…ker-controller-latest-block
… blocking We dont want the mutex to forever be locked if 1 chain takes a crazy long time to complete
7 tasks
salimtb
approved these changes
Aug 7, 2025
amitabh94
added a commit
that referenced
this pull request
Aug 8, 2025
## Explanation Bumps @metamask/assets-controllers to 73.1.0 to add comprehensive balance selectors for multichain account groups and wallets, along with dependency updates and bug fixes. ## References - [#6235](#6235) - Comprehensive balance selectors for multichain account groups and wallets - [#6248](#6248) - Bump keyring-api dependency - [#6242](#6242) - Fix DeFiPositionsController polling rate - [#6250](#6250) - Fix AccountTrackerController cache invalidation ## 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, highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Aug 8, 2025
…alls (#18092) ## **Description** Fixes an issue where the native token balances were not updating. Also updated the `AccountTrackerController.refresh` calls we make. The controller patch will be removed once this core package change is released MetaMask/core#6250 ## **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: fix: native token balance updates and optimise controller calls ## **Related issues** Fixes: #17958 ## **Manual testing steps** Please test native token transfers. 1. On extension, send tokens between accounts 2. On mobile, do you see the native token update after <3 min? Does the "swipe to refresh" update the native token? ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://www.loom.com/share/4e09abee586a46bfb584b9ae5adfc7c2?sid=1596d3dc-7e5a-4552-8ac2-bd1c6d9b7420 ### **After** https://www.loom.com/share/f17e067b35d74e71a1002bf177844b8f?sid=72499fc2-a31a-4cc9-b9db-5fd500343a5c <!-- [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 - [x] 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. ## **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.
runway-github bot
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Aug 8, 2025
…ler calls (#18092) ## **Description** Fixes an issue where the native token balances were not updating. Also updated the `AccountTrackerController.refresh` calls we make. The controller patch will be removed once this core package change is released MetaMask/core#6250 ## **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: fix: native token balance updates and optimise controller calls ## **Related issues** Fixes: #17958 ## **Manual testing steps** Please test native token transfers. 1. On extension, send tokens between accounts 2. On mobile, do you see the native token update after <3 min? Does the "swipe to refresh" update the native token? ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://www.loom.com/share/4e09abee586a46bfb584b9ae5adfc7c2?sid=1596d3dc-7e5a-4552-8ac2-bd1c6d9b7420 ### **After** https://www.loom.com/share/f17e067b35d74e71a1002bf177844b8f?sid=72499fc2-a31a-4cc9-b9db-5fd500343a5c <!-- [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 - [x] 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. ## **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.
runway-github bot
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Aug 8, 2025
…ler calls (#18092) ## **Description** Fixes an issue where the native token balances were not updating. Also updated the `AccountTrackerController.refresh` calls we make. The controller patch will be removed once this core package change is released MetaMask/core#6250 ## **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: fix: native token balance updates and optimise controller calls ## **Related issues** Fixes: #17958 ## **Manual testing steps** Please test native token transfers. 1. On extension, send tokens between accounts 2. On mobile, do you see the native token update after <3 min? Does the "swipe to refresh" update the native token? ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://www.loom.com/share/4e09abee586a46bfb584b9ae5adfc7c2?sid=1596d3dc-7e5a-4552-8ac2-bd1c6d9b7420 ### **After** https://www.loom.com/share/f17e067b35d74e71a1002bf177844b8f?sid=72499fc2-a31a-4cc9-b9db-5fd500343a5c <!-- [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 - [x] 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. ## **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.
runway-github bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Aug 8, 2025
…s and optimise controller calls (#18092) ## **Description** Fixes an issue where the native token balances were not updating. Also updated the `AccountTrackerController.refresh` calls we make. The controller patch will be removed once this core package change is released MetaMask/core#6250 ## **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: fix: native token balance updates and optimise controller calls ## **Related issues** Fixes: #17958 ## **Manual testing steps** Please test native token transfers. 1. On extension, send tokens between accounts 2. On mobile, do you see the native token update after <3 min? Does the "swipe to refresh" update the native token? ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://www.loom.com/share/4e09abee586a46bfb584b9ae5adfc7c2?sid=1596d3dc-7e5a-4552-8ac2-bd1c6d9b7420 ### **After** https://www.loom.com/share/f17e067b35d74e71a1002bf177844b8f?sid=72499fc2-a31a-4cc9-b9db-5fd500343a5c <!-- [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 - [x] 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. ## **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.
7 tasks
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.
Explanation
We have had issues on Mobile where fetching native and ERC balances were cached as we were never making calls with the latest block number.
Similar to the ERC-20 balance update fix (#6197), we will now force a block tracker update to ensure we grab the latest block before making RPC calls.
Long term we need to investigate and resolve the mobile block tracker not updating issue.
References
Changelog
Checklist