From 893e19b3cb1488e2b6ba77a1e1c14dedfee99cdf Mon Sep 17 00:00:00 2001 From: Florin Dzeladini Date: Thu, 12 Dec 2024 13:15:47 +0100 Subject: [PATCH] chore: fix comments --- packages/get-starknet/src/wallet.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/get-starknet/src/wallet.ts b/packages/get-starknet/src/wallet.ts index 88f1faa9..6ecd45c1 100644 --- a/packages/get-starknet/src/wallet.ts +++ b/packages/get-starknet/src/wallet.ts @@ -274,6 +274,9 @@ export class MetaMaskSnapWallet implements StarknetWindowObject { } else { throw new Error(`Unsupported event: ${String(event)}`); } + if(this.#accountChangeHandlers.length + this.#networkChangeHandlers.length === 0){ + this.#stopPolling(); + } } /**