Skip to content

Commit

Permalink
fix: move the default query client
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur-eren committed May 1, 2024
1 parent b7868d9 commit b13d481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/context/starknet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { ChainProviderFactory } from "~/providers";
import { ExplorerFactory } from "~/explorers/";
import { AccountProvider } from "./account";

const defaultQueryClient = new QueryClient();

/** State of the Starknet context. */
export interface StarknetState {
/** Connected connector. */
Expand Down Expand Up @@ -317,7 +319,7 @@ export function StarknetProvider({
});

return (
<QueryClientProvider client={queryClient ?? new QueryClient()}>
<QueryClientProvider client={queryClient ?? defaultQueryClient}>
<StarknetContext.Provider value={state}>
<AccountProvider account={account}>{children}</AccountProvider>
</StarknetContext.Provider>
Expand Down

0 comments on commit b13d481

Please sign in to comment.