Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAO-777: Fix error on claiming NFT #273

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ NEXT_PUBLIC_BUILD_ID=
NEXT_PUBLIC_RIF_ADDRESS=0x19f64674d8a5b4e652319f5e239efd3bc969a1fe
NEXT_PUBLIC_STRIF_ADDRESS=0xC4b091d97AD25ceA5922f09fe80711B7ACBbb16f
NEXT_PUBLIC_GOVERNOR_ADDRESS=0xB1A39B8f57A55d1429324EEb1564122806eb297F
NEXT_PUBLIC_EA_NFT_ADDRESS=0x979deF73ec80B8AE24Ae46765b81D9aF7b1C9327
NEXT_PUBLIC_EA_NFT_ADDRESS=0xa060A65967cb9b9511E3A4ec091Aa81c6dCe6662
NEXT_PUBLIC_MULTICALL_ADDRESS=0xcA11bde05977b3631167028862bE2a173976CA11
NEXT_PUBLIC_GRANTS_BUCKET_ADDRESS=0xfaca664c661af7e0e630c8f92b401012cd2a30ef
NEXT_PUBLIC_GRANTS_ACTIVE_BUCKET_ADDRESS=0x2217E4d3Ae0A6E30075D1B5a7b8C1520E8009f49
NEXT_PUBLIC_GROWTH_BUCKET_ADDRESS=0x420f39968009a0e8693a0e1bba633cd99eaffb9b
NEXT_PUBLIC_GENERAL_BUCKET_ADDRESS=0x72Ed7d7b7835Ad62B1f9b6280bAd62618aA71461
NEXT_PUBLIC_CHAIN_ID=31
NEXT_PUBLIC_CHAIN_ID=31
2 changes: 1 addition & 1 deletion .env.qa
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ NEXT_PUBLIC_GRANTS_BUCKET_ADDRESS=0xfaca664c661af7e0e630c8f92b401012cd2a30ef
NEXT_PUBLIC_GRANTS_ACTIVE_BUCKET_ADDRESS=0x2217E4d3Ae0A6E30075D1B5a7b8C1520E8009f49
NEXT_PUBLIC_GROWTH_BUCKET_ADDRESS=0x420f39968009a0e8693a0e1bba633cd99eaffb9b
NEXT_PUBLIC_GENERAL_BUCKET_ADDRESS=0x72Ed7d7b7835Ad62B1f9b6280bAd62618aA71461
NEXT_PUBLIC_CHAIN_ID=31
NEXT_PUBLIC_CHAIN_ID=31
2 changes: 1 addition & 1 deletion .env.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NEXT_PUBLIC_BUILD_ID=
NEXT_PUBLIC_RIF_ADDRESS=0x19f64674d8a5b4e652319f5e239efd3bc969a1fe
NEXT_PUBLIC_STRIF_ADDRESS=0x4861198e9A6814EBfb152552D1b1a37426C54D23
NEXT_PUBLIC_GOVERNOR_ADDRESS=0x2109FF4a9D5548a21F877cA937Ac5847Fde49694
NEXT_PUBLIC_EA_NFT_ADDRESS=0x979deF73ec80B8AE24Ae46765b81D9aF7b1C9327
NEXT_PUBLIC_EA_NFT_ADDRESS=0x0Ee4e11f2F2B551cA31Ea7873c7bA675cb51A59d
NEXT_PUBLIC_MULTICALL_ADDRESS=0xcA11bde05977b3631167028862bE2a173976CA11
NEXT_PUBLIC_GRANTS_BUCKET_ADDRESS=0xfaca664c661af7e0e630c8f92b401012cd2a30ef
NEXT_PUBLIC_GRANTS_ACTIVE_BUCKET_ADDRESS=0x2217E4d3Ae0A6E30075D1B5a7b8C1520E8009f49
Expand Down
7 changes: 3 additions & 4 deletions src/shared/hooks/useCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,13 @@ const useMintNFT = (nftAddress?: Address, tokensAvailable?: number) => {
const { writeContractAsync: mint, isPending, data: hash } = useWriteContract()
const { isLoading, isSuccess } = useWaitForTransactionReceipt({ hash })

const onMintNFT = useCallback(async () => {
const onMintNFT = useCallback(() => {
if (!nftAddress) throw new Error('Unknown NFT address')
if (!tokensAvailable) throw new Error('No NFTs available to mint')
return await mint({
return mint({
abi: abiContractsMap[nftAddress],
address: nftAddress || '0x0',
address: nftAddress,
functionName: 'mint',
args: [],
})
}, [mint, nftAddress, tokensAvailable])

Expand Down