From 2c3536bb4323a0c0c52898ee6bd0baf3b209c536 Mon Sep 17 00:00:00 2001 From: Vignesh Mohankumar Date: Tue, 19 Mar 2024 19:34:04 -0400 Subject: [PATCH] use configureChainsConfig --- src/App.tsx | 4 ++-- src/lib/wagmi.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e71cfe920..323999234 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -45,7 +45,7 @@ import { NotificationsToastArea } from '@/layout/NotificationsToastArea'; import { GlobalCommandDialog } from '@/views/dialogs/GlobalCommandDialog'; import { parseLocationHash } from '@/lib/urlUtils'; -import { config, privyConfig } from '@/lib/wagmi'; +import { config, configureChainsConfig, privyConfig } from '@/lib/wagmi'; const NewMarket = lazy(() => import('@/pages/markets/NewMarket')); const MarketsPage = lazy(() => import('@/pages/markets/Markets')); @@ -148,7 +148,7 @@ const providers = [ }), wrapProvider(QueryClientProvider, { client: queryClient }), wrapProvider(GrazProvider), - wrapProvider(PrivyWagmiConnector, { wagmiChainsConfig: config }), + wrapProvider(PrivyWagmiConnector, { wagmiChainsConfig: configureChainsConfig }), wrapProvider(WagmiConfig, { config }), wrapProvider(LocaleProvider), wrapProvider(RestrictionProvider), diff --git a/src/lib/wagmi.ts b/src/lib/wagmi.ts index ec1ba3561..70fddbf04 100644 --- a/src/lib/wagmi.ts +++ b/src/lib/wagmi.ts @@ -108,7 +108,7 @@ export const privyConfig: PrivyClientConfig = { defaultChain: defaultChainId === mainnet.id ? mainnet : sepolia, }; -const { chains, publicClient, webSocketPublicClient } = configureChains( +export const configureChainsConfig = configureChains( WAGMI_SUPPORTED_CHAINS, [ import.meta.env.VITE_ALCHEMY_API_KEY && @@ -119,6 +119,7 @@ const { chains, publicClient, webSocketPublicClient } = configureChains( publicProvider(), ].filter(isTruthy) ); +const { chains, publicClient, webSocketPublicClient } = configureChainsConfig; const injectedConnectorOptions = { chains,