Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591) - #9870
Merged
Merged
Conversation
salimtb
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Aug 13, 2026
Revert forceUpdate balance cache window from 100ms to staleTime/gcTime 0 so forced refreshes bypass TanStack cache (MetaMask/core#9870).
salimtb
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Aug 13, 2026
Revert forceUpdate balance cache window from 100ms to staleTime/gcTime 0 so forced refreshes bypass TanStack cache (MetaMask/core#9870).
4 tasks
salimtb
marked this pull request as ready for review
August 13, 2026 14:44
juanmigdr
previously approved these changes
Aug 13, 2026
Contributor
Author
|
@cursor pls merge latest main and address conflict |
|
I've successfully merged the latest main branch and resolved the merge conflict. Here's what was done: Conflict Resolution:
Changes:
The branch is now up-to-date with main, and all conflicts are resolved. |
juanmigdr
approved these changes
Aug 14, 2026
10 tasks
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 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.


This reverts commit 1b082f7.
Extension PR: MetaMask/metamask-extension#45494
Mobile PR: MetaMask/metamask-mobile#34748
Explanation
References
Checklist
Note
Medium Risk
Touches balance refresh behavior on user-visible paths (force refresh); tradeoff is fresher balances vs slightly more Accounts API traffic, with low security impact.
Overview
Reverts #9591: when
AccountsApiDataSourcehandles a balance fetch withforceUpdate: true, TanStack Query options go back tostaleTime: 0andgcTime: 0instead of a 100ms window.Forced refreshes (e.g. after unlock, account/network changes, or explicit refresh) are meant to hit the Accounts API with a fresh request; the short cache window could reuse a just-fetched entry and leave balances stale. The unit test is renamed/updated to assert cache bypass on
forceUpdate.The Unreleased changelog documents this revert; it also consolidates the Arc native USDC default-tracking note under Unreleased and drops a duplicate entry from the 13.1.3 section.
Reviewed by Cursor Bugbot for commit ed2395f. Bugbot is set up for automated code reviews on this repo. Configure here.