From 2328989c037e785c160cc0bc9fadcaa762be28e7 Mon Sep 17 00:00:00 2001 From: Jamie Lottering Date: Wed, 14 Feb 2024 17:36:50 -0800 Subject: [PATCH] Remove initialData in nonce and session (#349) It appears that in @tanstack/react-query v5 and up the query will not be fetched on mount if `initialData` is set. This means that the `ckSiweNonce` and `ckSiweSession` queries don't fire until their respective intervals have elapsed. This commit removes the `initialData` for both of these queries in order to restore previous functionality. --- packages/connectkit/src/siwe/SIWEProvider.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/connectkit/src/siwe/SIWEProvider.tsx b/packages/connectkit/src/siwe/SIWEProvider.tsx index bf0d40ce..0ea61799 100644 --- a/packages/connectkit/src/siwe/SIWEProvider.tsx +++ b/packages/connectkit/src/siwe/SIWEProvider.tsx @@ -48,14 +48,12 @@ export const SIWEProvider = ({ const nonce = useQuery({ queryKey: ['ckSiweNonce'], queryFn: () => siweConfig.getNonce(), - initialData: null, refetchInterval: nonceRefetchInterval, }); const session = useQuery({ queryKey: ['ckSiweSession'], queryFn: () => siweConfig.getSession(), - initialData: null, refetchInterval: sessionRefetchInterval, });