diff --git a/packages/assets-controller/CHANGELOG.md b/packages/assets-controller/CHANGELOG.md index 81e16e663b..cecd189bef 100644 --- a/packages/assets-controller/CHANGELOG.md +++ b/packages/assets-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Revert `AccountsApiDataSource` `forceUpdate` balance fetch cache window from `staleTime`/`gcTime` of `100`ms back to `0`/`0` (undoes [#9591](https://github.com/MetaMask/core/pull/9591)) so forced refreshes truly bypass the TanStack cache instead of reusing a short-lived entry ([#9870](https://github.com/MetaMask/core/pull/9870)) +- Fix Arc native USDC never appearing until the account receives its first deposit, by default-tracking the native asset id (`eip155:5042/slip44:5042`) instead of the `0x3600...` ERC20 identity so `assetsInfo` metadata is seeded up front ([#9869](https://github.com/MetaMask/core/pull/9869)) + ## [13.1.3] ### Changed @@ -15,7 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fix Arc native USDC never appearing until the account receives its first deposit, by default-tracking the native asset id (`eip155:5042/slip44:5042`) instead of the `0x3600...` ERC20 identity so `assetsInfo` metadata is seeded up front ([#9869](https://github.com/MetaMask/core/pull/9869)) - Properly filter empty (`''`) selected account group event ([#9825](https://github.com/MetaMask/core/pull/9825)) ## [13.1.2] diff --git a/packages/assets-controller/src/data-sources/AccountsApiDataSource.test.ts b/packages/assets-controller/src/data-sources/AccountsApiDataSource.test.ts index 68bf5896a0..e9605355f8 100644 --- a/packages/assets-controller/src/data-sources/AccountsApiDataSource.test.ts +++ b/packages/assets-controller/src/data-sources/AccountsApiDataSource.test.ts @@ -525,7 +525,7 @@ describe('AccountsApiDataSource', () => { controller.destroy(); }); - it('uses a short-lived TanStack cache window when forceUpdate is true', async () => { + it('fetch bypasses TanStack cache when forceUpdate is true', async () => { const { controller, apiClient } = await setupController(); await controller.fetch(createDataRequest({ forceUpdate: true })); @@ -533,7 +533,7 @@ describe('AccountsApiDataSource', () => { expect(apiClient.accounts.fetchV5MultiAccountBalances).toHaveBeenCalledWith( [`eip155:1:${MOCK_ADDRESS}`], undefined, - { staleTime: 100, gcTime: 100 }, + { staleTime: 0, gcTime: 0 }, ); controller.destroy(); diff --git a/packages/assets-controller/src/data-sources/AccountsApiDataSource.ts b/packages/assets-controller/src/data-sources/AccountsApiDataSource.ts index 3de2633e95..5f51b8d8c2 100644 --- a/packages/assets-controller/src/data-sources/AccountsApiDataSource.ts +++ b/packages/assets-controller/src/data-sources/AccountsApiDataSource.ts @@ -428,7 +428,7 @@ export class AccountsApiDataSource extends AbstractDataSource< } const fetchOptions = request.forceUpdate - ? { staleTime: 100, gcTime: 100 } + ? { staleTime: 0, gcTime: 0 } : undefined; // Feature-flagged: v6 endpoint with a fallback to legacy v5. The flag is