From e4ed82ddbf6a38bc60f7430141e5e98d8294caf2 Mon Sep 17 00:00:00 2001 From: pietro-maximoff Date: Mon, 28 Oct 2024 12:53:53 +0100 Subject: [PATCH] [SOV-4525] - Display LP Fee Rate Without Wallet Connection --- apps/frontend/src/contexts/CrocContext.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/contexts/CrocContext.tsx b/apps/frontend/src/contexts/CrocContext.tsx index 84065fffb..2fb35338a 100644 --- a/apps/frontend/src/contexts/CrocContext.tsx +++ b/apps/frontend/src/contexts/CrocContext.tsx @@ -10,7 +10,6 @@ import React, { import { getProvider } from '@sovryn/ethers-provider'; import { CrocEnv } from '@sovryn/sdex'; -import { useAccount } from '../hooks/useAccount'; import { useCurrentChain } from '../hooks/useChainStore'; type CrocContextValue = { @@ -27,14 +26,13 @@ export const useCrocContext = () => useContext(CrocContext) as CrocContextValue; export const CrocContextProvider: FC = ({ children }) => { const chainId = useCurrentChain(); - const { account, signer } = useAccount(); const [croc, setCroc] = useState(defaultContextValue.croc); useEffect(() => { - if (!croc && account) { - setCroc(new CrocEnv(getProvider(chainId), signer)); + if (!croc) { + setCroc(new CrocEnv(getProvider(chainId))); } - }, [croc, account, signer, chainId]); + }, [croc, chainId]); return ( {children}