Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591) - #9870
Open
salimtb wants to merge 3 commits into
Open
Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591)#9870salimtb wants to merge 3 commits into
salimtb wants to merge 3 commits into
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
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
Low Risk
Narrow revert in balance-fetch caching only; may increase duplicate API calls during force-refresh bursts but restores correct fresh-balance behavior.
Overview
Reverts #9591 so
AccountsApiDataSourceagain passesstaleTime: 0/gcTime: 0to the Accounts API balance client whenforceUpdateis true, instead of a 100ms cache window.Forced balance refreshes (account switch, post-tx refresh, subscription handoffs, etc.) are meant to skip TanStack Query reuse; the short window could still serve a cached response. The unit test is renamed/updated to assert full cache bypass, and the changelog records the fix under Fixed.
Reviewed by Cursor Bugbot for commit 1176879. Bugbot is set up for automated code reviews on this repo. Configure here.