From 383c70eff335faba07c61b3d324dcf2b2c1f4516 Mon Sep 17 00:00:00 2001 From: Terry Li Date: Mon, 29 Jan 2024 12:59:49 -0800 Subject: [PATCH] nft fixes (#2195) (#2196) Co-authored-by: Adrian --- wondrous-bot-admin/src/components/NFT/ClaimButton/index.tsx | 6 +++--- wondrous-bot-admin/src/graphql/mutations/payment.ts | 4 ++-- wondrous-bot-admin/src/graphql/queries/payment.ts | 5 +++-- .../src/pages/community-badge/claim/index.tsx | 6 ++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/wondrous-bot-admin/src/components/NFT/ClaimButton/index.tsx b/wondrous-bot-admin/src/components/NFT/ClaimButton/index.tsx index 558edd0bcd..268e83c9ec 100644 --- a/wondrous-bot-admin/src/components/NFT/ClaimButton/index.tsx +++ b/wondrous-bot-admin/src/components/NFT/ClaimButton/index.tsx @@ -37,14 +37,14 @@ const ClaimButton = ({ chain, nonce, signature, tokenId, setSuccess, nftMetadata const transaction = await contractInstance.claimBadge(1, BigInt(tokenId), nonce, signature); await transaction.wait(); - await linkTx({ variables: { txHash: transaction.hash, - nftMetadataId, + signature, cmtyUserId, }, }); + setSnackbarAlertMessage("Minting successful"); setSnackbarAlertOpen(true); setSuccess(true); @@ -95,7 +95,7 @@ const ClaimButton = ({ chain, nonce, signature, tokenId, setSuccess, nftMetadata <>{isMinting ?: <>{address ? "Claim now" : "Connect wallet"}} - {isMinting && Please don't close the webpage} + {isMinting && Please don't close the webpage} {isConnected ? ( open()} disabled={isMinting}> { const [isSuccess, setSuccess] = useState(false); const searchParams = new URLSearchParams(search); - const signature = searchParams.get("signature"); const cmtyUserId = searchParams.get("cmtyUserId"); const tokenId = searchParams.get("tokenId"); @@ -35,11 +34,10 @@ const CommunityBadgeClaimPage = () => { variables: { tokenId, cmtyUserId, - signature, }, }); } - }, [cmtyUserId, tokenId, signature]); + }, [cmtyUserId, tokenId]); const address = data?.getCmtyUserNftMetadata?.receiverAddress || ""; @@ -248,7 +246,7 @@ const CommunityBadgeClaimPage = () => { >