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

Commit 2ef87d7

Browse files
authored
upgrade thirdweb sdk to 2.2.0 (#48)
1 parent c437d64 commit 2ef87d7

File tree

5 files changed

+287
-210
lines changed

5 files changed

+287
-210
lines changed

docs/react.usecontractmetadata.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ Use this to get the contract metadata for a (built-in or custom) contract.
1212
<b>Signature:</b>
1313

1414
```typescript
15-
declare function useContractMetadata(contractAddress?: string): react_query.UseQueryResult<{
16-
[x: string]: _thirdweb_dev_sdk.Json;
17-
description?: string | undefined;
18-
image?: string | undefined;
19-
external_link?: string | undefined;
20-
name: string;
21-
} | undefined, unknown>;
15+
declare function useContractMetadata(contractAddress?: string): react_query.UseQueryResult<any, unknown>;
2216
```
2317

2418
## Parameters
@@ -29,7 +23,7 @@ declare function useContractMetadata(contractAddress?: string): react_query.UseQ
2923

3024
<b>Returns:</b>
3125

32-
react\_query.UseQueryResult&lt;{ \[x: string\]: \_thirdweb\_dev\_sdk.Json; description?: string \| undefined; image?: string \| undefined; external\_link?: string \| undefined; name: string; } \| undefined, unknown&gt;
26+
react\_query.UseQueryResult&lt;any, unknown&gt;
3327

3428
a response object that includes the contract metadata of the deployed contract
3529

docs/react.usenftmint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Use this to mint a new NFT on your ERC721 contract
1414
```typescript
1515
declare function useNFTMint(contract?: Erc721<any>, to?: string): react_query.UseMutationResult<_thirdweb_dev_sdk.TransactionResultWithId<_thirdweb_dev_sdk.NFTMetadataOwner>, unknown, string | {
1616
[x: string]: _thirdweb_dev_sdk.Json;
17+
name?: string | undefined;
1718
description?: string | undefined;
1819
image?: any;
1920
external_url?: any;
2021
animation_url?: any;
2122
background_color?: string | undefined;
2223
properties?: Record<string, _thirdweb_dev_sdk.Json> | Record<string, _thirdweb_dev_sdk.Json>[] | undefined;
2324
attributes?: Record<string, _thirdweb_dev_sdk.Json> | Record<string, _thirdweb_dev_sdk.Json>[] | undefined;
24-
name: string;
2525
}, unknown>;
2626
```
2727

@@ -34,7 +34,7 @@ declare function useNFTMint(contract?: Erc721<any>, to?: string): react_query.Us
3434

3535
<b>Returns:</b>
3636

37-
react\_query.UseMutationResult&lt;\_thirdweb\_dev\_sdk.TransactionResultWithId&lt;\_thirdweb\_dev\_sdk.NFTMetadataOwner&gt;, unknown, string \| { \[x: string\]: \_thirdweb\_dev\_sdk.Json; description?: string \| undefined; image?: any; external\_url?: any; animation\_url?: any; background\_color?: string \| undefined; properties?: Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt; \| Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt;\[\] \| undefined; attributes?: Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt; \| Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt;\[\] \| undefined; name: string; }, unknown&gt;
37+
react\_query.UseMutationResult&lt;\_thirdweb\_dev\_sdk.TransactionResultWithId&lt;\_thirdweb\_dev\_sdk.NFTMetadataOwner&gt;, unknown, string \| { \[x: string\]: \_thirdweb\_dev\_sdk.Json; name?: string \| undefined; description?: string \| undefined; image?: any; external\_url?: any; animation\_url?: any; background\_color?: string \| undefined; properties?: Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt; \| Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt;\[\] \| undefined; attributes?: Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt; \| Record&lt;string, \_thirdweb\_dev\_sdk.Json&gt;\[\] \| undefined; }, unknown&gt;
3838

3939
a mutation object that can be used to mint a new NFT token to the connected wallet
4040

etc/react.api.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,7 @@ export function useContract(contractAddress?: string): {
403403
export function useContractFunctions(contractAddress?: string): react_query.UseQueryResult<AbiFunction[] | null, unknown>;
404404

405405
// @beta
406-
export function useContractMetadata(contractAddress?: string): react_query.UseQueryResult<{
407-
[x: string]: _thirdweb_dev_sdk.Json;
408-
description?: string | undefined;
409-
image?: string | undefined;
410-
external_link?: string | undefined;
411-
name: string;
412-
} | undefined, unknown>;
406+
export function useContractMetadata(contractAddress?: string): react_query.UseQueryResult<any, unknown>;
413407

414408
// @beta
415409
export function useContractPublishMetadata(contractAddress?: string): react_query.UseQueryResult<PublishedMetadata | undefined, unknown>;
@@ -503,14 +497,14 @@ export function useNFTList(contract?: Erc721<any>, queryParams?: QueryAllParams)
503497
// @beta
504498
export function useNFTMint(contract?: Erc721<any>, to?: string): react_query.UseMutationResult<_thirdweb_dev_sdk.TransactionResultWithId<_thirdweb_dev_sdk.NFTMetadataOwner>, unknown, string | {
505499
[x: string]: _thirdweb_dev_sdk.Json;
500+
name?: string | undefined;
506501
description?: string | undefined;
507502
image?: any;
508503
external_url?: any;
509504
animation_url?: any;
510505
background_color?: string | undefined;
511506
properties?: Record<string, _thirdweb_dev_sdk.Json> | Record<string, _thirdweb_dev_sdk.Json>[] | undefined;
512507
attributes?: Record<string, _thirdweb_dev_sdk.Json> | Record<string, _thirdweb_dev_sdk.Json>[] | undefined;
513-
name: string;
514508
}, unknown>;
515509

516510
// Warning: (ae-forgotten-export) The symbol "BigNumber" needs to be exported by the entry point index.d.ts

src/hooks/async/contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export function useContractMetadata(contractAddress?: string) {
222222
contractAddress,
223223
typeAndPublishMetadata,
224224
sdk,
225-
)?.metadata.get();
225+
)?.metadata?.get();
226226
},
227227
{
228228
enabled: !!contractAddress || !!sdk,

0 commit comments

Comments
 (0)