Skip to content

Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591) - #9870

Merged
salimtb merged 5 commits into
mainfrom
revert/accounts-api-stale-gc-9591
Aug 14, 2026
Merged

Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591)#9870
salimtb merged 5 commits into
mainfrom
revert/accounts-api-stale-gc-9591

Conversation

@salimtb

@salimtb salimtb commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This reverts commit 1b082f7.

Extension PR: MetaMask/metamask-extension#45494
Mobile PR: MetaMask/metamask-mobile#34748

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

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 AccountsApiDataSource handles a balance fetch with forceUpdate: true, TanStack Query options go back to staleTime: 0 and gcTime: 0 instead 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.

@salimtb salimtb changed the title Revert "fix(assets-controller): increase stale and gc time for accoun… Revert "fix(assets-controller): increase stale and gc time for accounts api request (#9591) Aug 13, 2026
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).
@salimtb
salimtb marked this pull request as ready for review August 13, 2026 14:44
@salimtb
salimtb requested review from a team as code owners August 13, 2026 14:44
@salimtb
salimtb deployed to default-branch August 13, 2026 14:45 — with GitHub Actions Active
juanmigdr
juanmigdr previously approved these changes Aug 13, 2026
@salimtb

salimtb commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@cursor pls merge latest main and address conflict

@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown

I've successfully merged the latest main branch and resolved the merge conflict. Here's what was done:

Conflict Resolution:

Changes:

  • Created merge commit 160d4c1e89
  • Pushed to revert/accounts-api-stale-gc-9591 branch
  • PR is now mergeable (status: BLOCKED is expected for other requirements)

The branch is now up-to-date with main, and all conflicts are resolved.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 14, 2026 08:19
Resolved merge conflict in CHANGELOG.md by keeping both Fixed entries:
- Revert of AccountsApiDataSource forceUpdate cache window (#9870)
- Arc native USDC default-tracking fix (#9869)

Co-authored-by: Salim TOUBAL <salimtb@users.noreply.github.com>
@salimtb
salimtb added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit f55d3f5 Aug 14, 2026
58 checks passed
@salimtb
salimtb deleted the revert/accounts-api-stale-gc-9591 branch August 14, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants