Skip to content

Commit

Permalink
fix: handled error
Browse files Browse the repository at this point in the history
  • Loading branch information
RutvikGhaskataEalf committed Dec 26, 2024
1 parent 518b315 commit 39cce03
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/quick-start/developers/nft-dapp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ const createCollectionOnSideChain = async (
await delay(10000);
const { TransactionId } = await tdvw.chain.sendTransaction(signedTx2);
const txResult = await tdvw.chain.getTxResult(TransactionId);

if (txResult.Status === "SUCCESS" || txResult.Status === "MINED") {
done = true;
setIsNftCollectionCreated(true);
Expand All @@ -622,9 +622,11 @@ const createCollectionOnSideChain = async (
setTransactionStatus(false);
}
} catch (err) {
if (err && err.Error.includes("Cross chain verification failed.")) {
if ((err as { Error: string }).Error.includes("Cross chain verification failed.")) {
console.log("Exit.");
done = true;
} else {
console.error("An unexpected error occurred:", err);
}
}
}
Expand Down Expand Up @@ -1320,12 +1322,10 @@ const transferNftToOtherAccount = async (values: {
amount: string;
memo: string;
}) => {
if (Number(values.amount) > Number(nftBalance)) {
toast.error("Amount must be Less than or Equal to Supply Balance");
return;
}
const transferNFTLoadingId = toast.loading("Transfer Transaction Executing");
try {
Expand Down Expand Up @@ -1353,8 +1353,7 @@ const transferNftToOtherAccount = async (values: {
handleReturnClick();
} catch (error) {
console.error(error.message, "=====error");
toast.error(error.message);
handleError(transferNFTLoadingId, error);
}
};
```
Expand Down

0 comments on commit 39cce03

Please sign in to comment.