From 8a73dde7222b82c5ae5eea85a0e2dd706bd157d7 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Fri, 23 Feb 2024 13:41:31 -0500 Subject: [PATCH] Remove reference to `this.#chainId` from `#getCorrectChainIdAndNetworkClientId`, so that the method only relies on the network-controller, not the cached `this.#chainId` that could be stale --- packages/assets-controllers/src/TokenDetectionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/assets-controllers/src/TokenDetectionController.ts b/packages/assets-controllers/src/TokenDetectionController.ts index 391a773f71c..d4d1cd8d2ca 100644 --- a/packages/assets-controllers/src/TokenDetectionController.ts +++ b/packages/assets-controllers/src/TokenDetectionController.ts @@ -423,7 +423,7 @@ export class TokenDetectionController extends StaticIntervalPollingController< ); const newNetworkClientId = this.messagingSystem.call( 'NetworkController:findNetworkClientIdByChainId', - this.#chainId, + chainId, ); return { chainId,