Check for snowball address being null
This commit is contained in:
parent
31c1409312
commit
38444dec28
@ -23,7 +23,7 @@ const ConnectWallet = () => {
|
|||||||
|
|
||||||
const cosmosSendTokensHandler = useCallback(
|
const cosmosSendTokensHandler = useCallback(
|
||||||
async (senderAddress: string, amount: string) => {
|
async (senderAddress: string, amount: string) => {
|
||||||
if (!signClient || !session || !selectedAccount) {
|
if (!signClient || !session || !selectedAccount || !snowballAddress) {
|
||||||
console.log({signClient, session, selectedAccount})
|
console.log({signClient, session, selectedAccount})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -52,14 +52,17 @@ const ConnectWallet = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTxHash(result.signature);
|
setTxHash(result.signature);
|
||||||
console.log(txHash)
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[session, signClient, selectedAccount],
|
[session, signClient, selectedAccount, snowballAddress],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log(txHash)
|
||||||
|
}, [txHash])
|
||||||
|
|
||||||
const fetchSnowballAddress = useCallback(async() => {
|
const fetchSnowballAddress = useCallback(async() => {
|
||||||
|
|
||||||
const address = await client.getAddress();
|
const address = await client.getAddress();
|
||||||
|
Loading…
Reference in New Issue
Block a user