diff --git a/deploy-web/src/context/WalletProvider/WalletProvider.tsx b/deploy-web/src/context/WalletProvider/WalletProvider.tsx index d729494c9..a340972d4 100644 --- a/deploy-web/src/context/WalletProvider/WalletProvider.tsx +++ b/deploy-web/src/context/WalletProvider/WalletProvider.tsx @@ -67,11 +67,11 @@ export const WalletProvider = ({ children }) => { useEffect(() => { (async () => { - if (settings?.rpcEndpoint) { - sigingClient.current = await createStargateClient(); + if (settings?.rpcEndpoint && isWalletConnected) { + sigingClient.current = await createStargateClient();console.log("Setup client for " + settings?.rpcEndpoint); } })(); - }, [settings?.rpcEndpoint]); + }, [settings?.rpcEndpoint, isWalletConnected]); async function createStargateClient() { const selectedNetwork = getSelectedNetwork();