From 38444dec2844948b047314d1a785650899d2256d Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 25 Oct 2024 11:47:17 +0530 Subject: [PATCH] Check for snowball address being null --- .../src/components/projects/create/ConnectWallet.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index 09bd87bb..0c38a1e4 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -23,7 +23,7 @@ const ConnectWallet = () => { const cosmosSendTokensHandler = useCallback( async (senderAddress: string, amount: string) => { - if (!signClient || !session || !selectedAccount) { + if (!signClient || !session || !selectedAccount || !snowballAddress) { console.log({signClient, session, selectedAccount}) return; } @@ -52,14 +52,17 @@ const ConnectWallet = () => { } setTxHash(result.signature); - console.log(txHash) } catch (error: any) { throw error; } }, - [session, signClient, selectedAccount], + [session, signClient, selectedAccount, snowballAddress], ); + useEffect(() => { + console.log(txHash) + }, [txHash]) + const fetchSnowballAddress = useCallback(async() => { const address = await client.getAddress();