Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.
Merged
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 docs/react.uselazymint.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use this to lazy mint a batch of NFTs on your [DropContract](./react.dropcontrac
<b>Signature:</b>

```typescript
export declare function useLazyMint<TContract extends Erc721>(contract: RequiredParam<TContract>, onProgress?: (progress: UploadProgressEvent) => void): import("@tanstack/react-query").UseMutationResult<import("@thirdweb-dev/sdk/dist/browser").TransactionResultWithId<{
export declare function useLazyMint<TContract extends NFTContract>(contract: RequiredParam<TContract>, onProgress?: (progress: UploadProgressEvent) => void): import("@tanstack/react-query").UseMutationResult<import("@thirdweb-dev/sdk/dist/browser").TransactionResultWithId<{
[x: string]: import("@thirdweb-dev/sdk/dist/browser").Json;
name?: string | undefined;
description?: string | null | undefined;
Expand All @@ -30,7 +30,7 @@ export declare function useLazyMint<TContract extends Erc721>(contract: Required

| Parameter | Type | Description |
| --- | --- | --- |
| contract | [RequiredParam](./react.requiredparam.md)<!-- -->&lt;TContract&gt; | an instance of a with the drop extension |
| contract | [RequiredParam](./react.requiredparam.md)<!-- -->&lt;TContract&gt; | an instance of a [NFTContract](./react.nftcontract.md) with the drop extension |
| onProgress | (progress: UploadProgressEvent) =&gt; void | <i>(Optional)</i> an optional callback that will be called with the progress of the upload |

<b>Returns:</b>
Expand Down
4 changes: 2 additions & 2 deletions etc/react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { EditionDrop } from '@thirdweb-dev/sdk/dist/browser';
import { Erc1155 } from '@thirdweb-dev/sdk/dist/browser';
import type { Erc1155Mintable } from '@thirdweb-dev/sdk/dist/browser';
import type { Erc20 } from '@thirdweb-dev/sdk/dist/browser';
import { Erc721 } from '@thirdweb-dev/sdk/dist/browser';
import type { Erc721 } from '@thirdweb-dev/sdk/dist/browser';
import type { Erc721Mintable } from '@thirdweb-dev/sdk/dist/browser';
import type { EventQueryFilter } from '@thirdweb-dev/sdk/dist/browser';
import { FetchStatus } from '@tanstack/react-query';
Expand Down Expand Up @@ -1375,7 +1375,7 @@ address: WalletAddress;
export function useIsAddressRole<TContract extends ContractWithRoles>(contract: RequiredParam<TContract>, role: RolesForContract<TContract>, walletAddress: RequiredParam<WalletAddress>): boolean;

// @beta
export function useLazyMint<TContract extends Erc721>(contract: RequiredParam<TContract>, onProgress?: (progress: UploadProgressEvent) => void): UseMutationResult<TransactionResultWithId< {
export function useLazyMint<TContract extends NFTContract>(contract: RequiredParam<TContract>, onProgress?: (progress: UploadProgressEvent) => void): UseMutationResult<TransactionResultWithId< {
[x: string]: Json;
name?: string | undefined;
description?: string | null | undefined;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "2.6.2",
"version": "2.6.3-0",
"repository": {
"type": "git",
"url": "git+https://github.com:thirdweb-dev/react.git"
Expand Down Expand Up @@ -34,7 +34,7 @@
"@microsoft/api-extractor": "^7.19.4",
"@microsoft/tsdoc": "^0.14.1",
"@swc/core": "^1.2.177",
"@thirdweb-dev/sdk": "^2.3.25-3",
"@thirdweb-dev/sdk": "^2.3.35-1",
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
"@types/mime": "^2.0.3",
"@types/react": "^18.0.5",
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/async/drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ClaimNFTParams,
ClaimNFTReturnType,
DropContract,
NFTContract,
RequiredParam,
} from "../../types";
import {
Expand All @@ -13,7 +14,6 @@ import { useQueryWithNetwork } from "../query-utils/useQueryWithNetwork";
import { useNFTs } from "./nft";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import {
Erc721,
Erc1155,
NFTDrop,
NFTMetadataInput,
Expand Down Expand Up @@ -203,12 +203,12 @@ export function useClaimNFT<TContract extends DropContract>(
/**
* Use this to lazy mint a batch of NFTs on your {@link DropContract}
*
* @param contract - an instance of a {@link ERC721} with the drop extension
* @param contract - an instance of a {@link NFTContract} with the drop extension
* @param onProgress - an optional callback that will be called with the progress of the upload
* @returns a mutation object that can be used to lazy mint a batch of NFTs
* @beta
*/
export function useLazyMint<TContract extends Erc721>(
export function useLazyMint<TContract extends NFTContract>(
contract: RequiredParam<TContract>,
onProgress?: (progress: UploadProgressEvent) => void,
) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1082,10 +1082,10 @@
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts/-/contracts-3.0.3.tgz#ba83b7e28ab01a88358de479cf98cddbf835ff56"
integrity sha512-TQRrML5SwbTb0VA1nu7VLxqIXrqMfvaXOBFT//yA9Jdd7GNsG4zSQHlHpkU4KWG1r766poG/AuXwz8KQ1A9IBg==

"@thirdweb-dev/sdk@^2.3.25-3":
version "2.3.33"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-2.3.33.tgz#85d35ab3cb52cde2dc825e0d816742efa6b16d1e"
integrity sha512-lYMBi2L02U/1LA5XDAQCHb5vT9LGVlsRUTtivWt9jrEmq/vMZB6tPAbGcu7CFZOJWWkajuw83eWu3xMNNEnRog==
"@thirdweb-dev/sdk@^2.3.35-1":
version "2.3.35-1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-2.3.35-1.tgz#efd3eb869cde10999f05c252eeeedd5d4430fed1"
integrity sha512-A4uCbpZmj4sYXXA61GuG+M+aNyc/xb5fwX0tmFCUj47MENcmzfNM4oAew//lYp0EocIjVrrX6mchjL4tJP+nSA==
dependencies:
"@thirdweb-dev/contracts" "^3.0.0"
"@web-std/file" "^3.0.0"
Expand Down