release: 7.64.1.1 OTA#25920
Conversation
This reverts commit 61903fe.
|
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. |
<!-- 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** Cherry-pick of #25797 ## **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: remove old erc-20 balances that fully get swapped ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin 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** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] 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-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.
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: stable) All E2E tests pre-selected. |
| + const key = `${account.toLowerCase()}-${tokenLowerCase}-${chainId}`; | ||
| + const isERC = tokenAddress !== ZERO_ADDRESS; | ||
| + const existingBalance = nonNativeBalancesFromAPI.get(key); | ||
| + if (isERC && !existingBalance) { |
There was a problem hiding this comment.
Truthiness check instead of Map.has() for balance existence
Low Severity
The check !existingBalance uses truthiness to determine whether the API returned a balance for a token, but nonNativeBalancesFromAPI.get(key) returns the stored value, not a boolean. If a balance value is ever falsy (e.g., numeric 0 instead of a BN object), the check passes incorrectly and a duplicate zero-balance entry gets pushed into results. Using !nonNativeBalancesFromAPI.has(key) would correctly test for key existence regardless of the stored value's truthiness.
Additional Locations (1)
|





Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches token balance fetching logic (via a patched dependency), which could affect displayed asset balances if the backfill logic is incorrect, but the rest is routine version/build number bumping.
Overview
Bumps release metadata for the OTA:
OTA_VERSIONmovesv0→v1, and Android/iOS/Bitrise build numbers are updated3667→3698.Applies a Yarn patch to
@metamask/assets-controllers@98.0.0that threads currenttokenBalancesintoAccountsApiBalanceFetcherand backfills missing ERC-20 entries with explicit0balances when the Accounts API omits them, aiming to keep tracked user tokens present in balance results.Written by Cursor Bugbot for commit 02f2728. This will update automatically on new commits. Configure here.