fix: cp-7.57.0 fix api fetcher balances#21014
Merged
Merged
Conversation
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. |
dcab5a5 to
f04b14d
Compare
bergarces
approved these changes
Oct 10, 2025
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Description
The
AccountsApiBalanceFetcherhad a bug caused by address format incompatibility between controllers:TokenBalancesControlleruses lowercase addresses for ERC20 tokensAccountTrackerControlleruses checksum addresses for native tokensThe original code always checksummed all addresses, causing a wrong token balances state
core PR: MetaMask/core#6812
Changelog
CHANGELOG entry: fix balances issue update when api fetcher is used
Related issues
Fixes: #21030
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adjusts
AccountsApiBalanceFetcherto use the correct account address format per token type and applies Yarn patches for@metamask/assets-controllersv78/v79.dist/multi-chain-accounts-service/api-balance-fetcher.cjs:finalAccountbased on token type (zero address vs. others).finalAccountfornativeBalancesFromAPIkeys and returnedaccountfield.@metamask/assets-controllers^78.0.1and^79.0.0inpackage.jsonand.yarn/patches/.yarn.lockto reference patched@metamask/assets-controllers79.0.0.Written by Cursor Bugbot for commit 3968057. This will update automatically on new commits. Configure here.