Skip to main content

useClaimIneligibilityReasons() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to check for reasons that prevent claiming for either ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition extension for this hook to work.

Example 1

const { data: activeClaimCondition, isLoading, error } = useClaimIneligibilityReasons(<YourERC20ContractInstance>, { walletAddress: <walletAddress> });

Example 2

const { data: claimIneligibilityReasons, isLoading, error } = useClaimIneligibilityReasons(<YourERC721ContractInstance>, { quantity: <quantity>, walletAddress: <walletAddress> });

Example 3

const { data: claimIneligibilityReasons, isLoading, error } = useClaimIneligibilityReasons(<YourERC1155ContractInstance>, { quantity: <quantity>, walletAddress: <walletAddress> }, <tokenId>);

Signature:

export declare function useClaimIneligibilityReasons<
TContract extends NFTContract,
>(
...[contract, params, tokenId]: ClaimIneligibilityInputParams<TContract>
): import("@tanstack/react-query").UseQueryResult<
import("@thirdweb-dev/sdk/dist/browser").ClaimEligibility[],
unknown
>;

Parameters

ParameterTypeDescription
[contract, params, tokenId]ClaimIneligibilityInputParams<TContract>

Returns:

import("@tanstack/react-query").UseQueryResult<import("@thirdweb-dev/sdk/dist/browser").ClaimEligibility[], unknown>

a response object with the resons for the claim ineligibility