Skip to content

Commit 577a337

Browse files
committed
fix: update useSyncAccountWithUserStore to set chainId only when currentChain is found
1 parent 067cbe9 commit 577a337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useSyncAccountWithUserStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export function useSyncAccountWithUserStore() {
2525
if (currentChain) {
2626
setSubgraphUrl(currentChain?.subgraphUrl);
2727
queryClient.invalidateQueries({ queryKey: [chainId] });
28+
setChainId(chain!.id);
2829
}
29-
setChainId(chain?.id);
3030
}, [
3131
connector,
3232
status,

0 commit comments

Comments
 (0)