From a6823a527c32e96e3b4d88d747d4ac5d0b4b092f Mon Sep 17 00:00:00 2001 From: Redm4x <2829180+Redm4x@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:13:09 -0500 Subject: [PATCH] Fix signing client when no wallet connected --- deploy-web/src/context/WalletProvider/WalletProvider.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();