From c352fcd4d52af634436b3725fb75543d087daf96 Mon Sep 17 00:00:00 2001 From: AnhMTV Date: Thu, 5 Dec 2024 10:08:27 +0700 Subject: [PATCH] [Hot-fix] Update for testing (3) --- .../src/components/Mint/MintNftDetail/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/extension-koni-ui/src/components/Mint/MintNftDetail/index.tsx b/packages/extension-koni-ui/src/components/Mint/MintNftDetail/index.tsx index 302e14883f..3a1e00d286 100644 --- a/packages/extension-koni-ui/src/components/Mint/MintNftDetail/index.tsx +++ b/packages/extension-koni-ui/src/components/Mint/MintNftDetail/index.tsx @@ -334,6 +334,8 @@ const Component: React.FC = (props: Props) => { return; } + setIsLoading(true); // Hot fix minting loading problems + const transaction = await odysseyMintNft({ address, chain: 'storyOdyssey_testnet', signature }); // account has insufficient balance @@ -481,12 +483,11 @@ const Component: React.FC = (props: Props) => { setIsLoading(false); } else if (mintingLog?.status === 'minting') { mintingFlag.current = true; - setIsLoading(true); } else if (mintingLog?.status === 'submitted') { mintingFlag.current = true; setIsLoading(true); } else if (mintingLog?.status === 'failed') { - setIsLoading(false); + mintingFlag.current && setIsLoading(false); mintingFlag.current && handleFailedToMintModal().then(goHome).catch(console.error); } }, [goHome, handleFailedToMintModal, mintingLog, onSuccess]);