Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

[Bug]: useActiveClaimCondition with ERC-1155 Requires BigNumber type token ID argument #145

@jarrodwatts

Description

@jarrodwatts

Code to re-produce:

  const { data: activeClaimCondition } = useActiveClaimCondition(
    editionDrop, 0
  );

Using edition drop prebuilt contract, try to read the active claim condition like this:

  const { data: activeClaimCondition } = useActiveClaimCondition(
    editionDrop, 0
  );

Throws invariant:

Invariant failed: tokenId is required for ERC1155 claim conditions

Even though token id 0 is being passed in. If I change it to this then it works fine:

  const { data: activeClaimCondition } = useActiveClaimCondition(
    editionDrop,
    BigNumber.from(0)
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersworkaround availablea bug exists, but there is a known workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions