From 28fccbaf213cb7b7dee1577cda93133ac3adb36d Mon Sep 17 00:00:00 2001 From: yuli-ferna Date: Wed, 10 Apr 2024 11:04:52 -0400 Subject: [PATCH] fix --- src/components/Attest/Target.tsx | 28 ++++++++++++++++------------ src/components/Attest/index.tsx | 2 -- src/hooks/useHandleCreateWrapped.tsx | 14 +++++++------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/components/Attest/Target.tsx b/src/components/Attest/Target.tsx index 1c43f3e63..093e6daf2 100644 --- a/src/components/Attest/Target.tsx +++ b/src/components/Attest/Target.tsx @@ -16,6 +16,7 @@ import ButtonWithLoader from "../ButtonWithLoader"; import ChainSelect from "../ChainSelect"; import KeyAndBalance from "../KeyAndBalance"; import LowBalanceWarning from "../LowBalanceWarning"; +import { isCosmosChain } from "../../utils/cosmos"; const useStyles = makeStyles((theme) => ({ alert: { @@ -56,18 +57,21 @@ function Target() { chains={chains} /> - - - You will have to pay transaction fees on{" "} - {CHAINS_BY_ID[targetChain].name} to attest this token.{" "} - - {isEVMChain(targetChain) && ( - - )} - + {/* In the case of cosmos chain target no fees are required */} + {!isCosmosChain(targetChain) && ( + + + You will have to pay transaction fees on{" "} + {CHAINS_BY_ID[targetChain].name} to attest this token.{" "} + + {isEVMChain(targetChain) && ( + + )} + + )} : } - {/* ONLY FOR TEST */} - {/* = 2}> */} = 3}> dispatch(setStep(3))} diff --git a/src/hooks/useHandleCreateWrapped.tsx b/src/hooks/useHandleCreateWrapped.tsx index ab4e6f935..ba8b11cc4 100644 --- a/src/hooks/useHandleCreateWrapped.tsx +++ b/src/hooks/useHandleCreateWrapped.tsx @@ -691,21 +691,18 @@ async function cosmos( ) { dispatch(setIsCreating(true)); let tries = 0; + let messageShow = false; const interval = setInterval(async () => { try { if (tries <= 5) { tries++; - // ONLY FOR TEST - // const txs = await queryWormchain('85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ', CHAIN_ID_SOLANA); const txs = await queryWormchain(sourceChainAddress, sourceChain); - console.log("txs", txs); if (txs.length === 0) { return null; } if (txs.length > 1) { throw new Error("Multiple transactions found"); } - clearInterval(interval); dispatch( setCreateTx({ @@ -713,9 +710,12 @@ async function cosmos( block: txs[0].height, }) ); - enqueueSnackbar(null, { - content: Transaction confirmed, - }); + if (!messageShow) { + messageShow = true; + enqueueSnackbar(null, { + content: Transaction confirmed, + }); + } } else { clearInterval(interval); dispatch(setIsCreating(false));