diff --git a/.changeset/cool-cycles-chew.md b/.changeset/cool-cycles-chew.md new file mode 100644 index 00000000..2cdee46b --- /dev/null +++ b/.changeset/cool-cycles-chew.md @@ -0,0 +1,5 @@ +--- +'@starknet-react/core': patch +--- + +ensure autoconnect executes once diff --git a/packages/core/src/providers/starknet/manager.ts b/packages/core/src/providers/starknet/manager.ts index 54b5e6cd..ecba7aec 100644 --- a/packages/core/src/providers/starknet/manager.ts +++ b/packages/core/src/providers/starknet/manager.ts @@ -102,7 +102,10 @@ export function useStarknetManager({ if (autoConnect && !account) { tryAutoConnect(connectors) } - }, [account, autoConnect, connectors]) + // Dependencies intentionally omitted since we only want + // this executed once. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) return { account, connect, connectors, library, error } }