From d26f60210c9c1b526cad3a504deaefb9c3683abb Mon Sep 17 00:00:00 2001 From: salimtb Date: Sun, 10 Nov 2024 23:31:05 +0100 Subject: [PATCH] fix: add params to start polling --- .../src/TokenDetectionController.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/assets-controllers/src/TokenDetectionController.ts b/packages/assets-controllers/src/TokenDetectionController.ts index a2d9a744c1..72898bcb83 100644 --- a/packages/assets-controllers/src/TokenDetectionController.ts +++ b/packages/assets-controllers/src/TokenDetectionController.ts @@ -452,17 +452,23 @@ export class TokenDetectionController extends StaticIntervalPollingController { + async #startPolling({ + chainIds, + address, + }: TokenDetectionPollingInput): Promise { if (!this.isActive) { return; } this.#stopPolling(); - await this.detectTokens(); + await this.detectTokens({ chainIds, selectedAddress: address }); // TODO: Either fix this lint violation or explain why it's necessary to ignore. // eslint-disable-next-line @typescript-eslint/no-misused-promises this.#intervalId = setInterval(async () => { - await this.detectTokens(); + await this.detectTokens({ chainIds, selectedAddress: address }); }, this.getIntervalLength()); }