From cb04ea9088e36d859853b160390a8d5ca3b8d08c Mon Sep 17 00:00:00 2001 From: adrian mustea Date: Mon, 29 Jan 2024 22:35:45 +0200 Subject: [PATCH] nft fixes --- 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 = () => { >