Function useCancelDirectListing

  • Cancel a direct listing

    Parameters

    • contract: RequiredParam<MarketplaceV3>

      an instance of a Marketplace v3 contract

    Returns UseMutationResult<Omit<{
        data: (() => Promise<unknown>);
        receipt: providers.TransactionReceipt;
    }, "data">, unknown, BigNumberish, unknown>

    a mutation object that can be used to cancel a direct listing

    Example

    const Component = () => {
    const { contract } = useContract("{{contract_address}}");
    const {
    mutate: cancelDirectListing,
    isLoading,
    error,
    } = useCancelDirectListing(contract);

    if (error) {
    console.error("failed to cancel direct listing", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={cancelDirectListing}
    >
    Cancel Direct Listing
    </button>
    );
    };

    Twfeature

    DirectListings

    See

    Documentation

Generated using TypeDoc