From a8665250bf32aac35e7db35cdb7df27b13558c55 Mon Sep 17 00:00:00 2001 From: voenkomatiwe Date: Tue, 13 Feb 2024 16:56:37 +0200 Subject: [PATCH] feat: On the Explorer, the default network overrides the URL --- explorer/src/providers/network-provider/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/explorer/src/providers/network-provider/index.tsx b/explorer/src/providers/network-provider/index.tsx index 8d61fb62..045bf0e0 100644 --- a/explorer/src/providers/network-provider/index.tsx +++ b/explorer/src/providers/network-provider/index.tsx @@ -4,7 +4,6 @@ import { FC, PropsWithChildren, useCallback, useState } from "react"; import { useLoaderData, useLocation, useNavigate } from "react-router-dom"; import { useAccount, useNetwork } from "wagmi"; -import { defaultChain } from "@/config"; import { INetwork } from "@/interfaces/config"; import { NetworkContext } from "./context"; @@ -18,7 +17,7 @@ export const NetworkContextProvider: FC = ({ children }): JSX const retrievedNetwork = useLoaderData() as INetwork; const [network, setNetwork] = useState(retrievedNetwork); - const [sdk, setSdk] = useState(new VeraxSdk(defaultChain.veraxEnv)); + const [sdk, setSdk] = useState(new VeraxSdk(network.veraxEnv)); const switchUserNetwork = useCallback( async (pendingChain: Chain, currentChainId?: number) => {