diff --git a/src/state/connectedWalletStarknetkitNext.ts b/src/state/connectedWalletStarknetkitNext.ts index 5daa657..6161101 100644 --- a/src/state/connectedWalletStarknetkitNext.ts +++ b/src/state/connectedWalletStarknetkitNext.ts @@ -3,7 +3,7 @@ import { ChainId, NetworkChangeEventHandler, } from "@starknet-io/types-js" -import { useAtom, useAtomValue, useSetAtom } from "jotai" +import { useAtomValue, useSetAtom } from "jotai" import { atomWithReset } from "jotai/utils" import { useEffect } from "react" import { ConnectorData, StarknetWindowObject } from "starknetkit-next" @@ -53,5 +53,5 @@ export const useWalletAccountChange = () => { wallet?.off("accountsChanged", accountChangeHandler) wallet?.off("networkChanged", networkChangeHandler) return - }, []) + }, [accountChangeHandler, networkChangeHandler]) }