@0xsequence/marketplace-sdk 0.4.9 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BMWCIHCB.js → chunk-5NORRVPM.js} +1 -1
- package/dist/{chunk-BMWCIHCB.js.map → chunk-5NORRVPM.js.map} +1 -1
- package/dist/{chunk-ATDCYXXV.js → chunk-6YHHCGGY.js} +2 -2
- package/dist/{chunk-CUA4SGWT.js → chunk-HV2X2VZN.js} +366 -192
- package/dist/chunk-HV2X2VZN.js.map +1 -0
- package/dist/{chunk-Y3KINNAU.js → chunk-J2XJZ6SJ.js} +2 -2
- package/dist/{chunk-TFCSNRD5.js → chunk-LJAB3S6U.js} +1 -1
- package/dist/chunk-LJAB3S6U.js.map +1 -0
- package/dist/{chunk-BJLOO4NP.js → chunk-OUVFTA63.js} +30 -26
- package/dist/chunk-OUVFTA63.js.map +1 -0
- package/dist/{chunk-XXML5K3X.js → chunk-QTJF5GDQ.js} +2 -2
- package/dist/{chunk-LF44FCG5.js → chunk-TQWM4ER6.js} +2 -2
- package/dist/{chunk-LF44FCG5.js.map → chunk-TQWM4ER6.js.map} +1 -1
- package/dist/{chunk-7HWJ4DUX.js → chunk-WSCUPAGR.js} +7 -3
- package/dist/chunk-WSCUPAGR.js.map +1 -0
- package/dist/{create-config-CgYQDyMD.d.ts → create-config-BXvwUh55.d.ts} +2 -2
- package/dist/index.css +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{marketplace-config-BP5-XnFG.d.ts → marketplace-config-znEu4L0K.d.ts} +1 -1
- package/dist/{marketplace.gen-BzmWLP9L.d.ts → marketplace.gen-CCJ-URn2.d.ts} +2 -0
- package/dist/react/_internal/api/index.d.ts +3 -2
- package/dist/react/_internal/api/index.js +1 -1
- package/dist/react/_internal/index.d.ts +5 -5
- package/dist/react/_internal/index.js +1 -1
- package/dist/react/_internal/wagmi/index.d.ts +3 -3
- package/dist/react/hooks/index.d.ts +208 -74
- package/dist/react/hooks/index.js +10 -4
- package/dist/react/index.css +2 -2
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +14 -8
- package/dist/react/ssr/index.js +4 -0
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/collectible-card/index.css +2 -2
- package/dist/react/ui/components/collectible-card/index.css.map +1 -1
- package/dist/react/ui/components/collectible-card/index.d.ts +3 -3
- package/dist/react/ui/components/collectible-card/index.js +8 -8
- package/dist/react/ui/icons/index.js +3 -3
- package/dist/react/ui/index.css +2 -2
- package/dist/react/ui/index.css.map +1 -1
- package/dist/react/ui/index.d.ts +3 -3
- package/dist/react/ui/index.js +8 -8
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +5 -5
- package/dist/{sdk-config-LbbmA85k.d.ts → sdk-config-B32_2bG3.d.ts} +4 -2
- package/dist/{services-DW26ougH.d.ts → services-BRBVE0mm.d.ts} +1 -1
- package/dist/styles/index.css +2 -2
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/index.js +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +1 -1
- package/dist/{types-DhTZWw1U.d.ts → types-Yto6KrTN.d.ts} +2 -2
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +1 -1
- package/package.json +16 -16
- package/src/react/_internal/api/marketplace.gen.ts +6 -3
- package/src/react/_internal/api/query-keys.ts +4 -0
- package/src/react/hooks/index.ts +2 -0
- package/src/react/hooks/useAutoSelectFeeOption.tsx +104 -0
- package/src/react/hooks/useCancelOrder.tsx +57 -1
- package/src/react/hooks/useCollectionBalanceDetails.tsx +87 -0
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +10 -12
- package/src/react/ui/components/collectible-card/styles.css.ts +1 -1
- package/src/react/ui/icons/CartIcon.tsx +2 -2
- package/src/react/ui/modals/BuyModal/hooks/useBuyCollectable.ts +7 -4
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/useHandleTransfer.tsx +5 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-7HWJ4DUX.js.map +0 -1
- package/dist/chunk-BJLOO4NP.js.map +0 -1
- package/dist/chunk-CUA4SGWT.js.map +0 -1
- package/dist/chunk-TFCSNRD5.js.map +0 -1
- /package/dist/{chunk-ATDCYXXV.js.map → chunk-6YHHCGGY.js.map} +0 -0
- /package/dist/{chunk-Y3KINNAU.js.map → chunk-J2XJZ6SJ.js.map} +0 -0
- /package/dist/{chunk-XXML5K3X.js.map → chunk-QTJF5GDQ.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/marketplace-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
@@ -34,27 +34,27 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@legendapp/state": "^3.0.0-beta.26",
|
|
37
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
38
|
-
"@radix-ui/react-popover": "^1.1.
|
|
39
|
-
"@radix-ui/react-select": "^2.1.
|
|
37
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
38
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
39
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
40
40
|
"date-fns": "^4.1.0",
|
|
41
41
|
"react-day-picker": "^9.5.1",
|
|
42
42
|
"zod": "^3.24.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"0xsequence": "^2.2.
|
|
46
|
-
"@0xsequence/api": "^2.2.
|
|
45
|
+
"0xsequence": "^2.2.13",
|
|
46
|
+
"@0xsequence/api": "^2.2.13",
|
|
47
47
|
"@0xsequence/design-system": "^1.9.0",
|
|
48
|
-
"@0xsequence/indexer": "^2.2.
|
|
49
|
-
"@0xsequence/kit": "^4.
|
|
50
|
-
"@0xsequence/kit-checkout": "^4.
|
|
51
|
-
"@0xsequence/metadata": "^2.2.
|
|
52
|
-
"@0xsequence/network": "^2.2.
|
|
53
|
-
"@tanstack/react-query": "^5.
|
|
48
|
+
"@0xsequence/indexer": "^2.2.13",
|
|
49
|
+
"@0xsequence/kit": "^4.6.0",
|
|
50
|
+
"@0xsequence/kit-checkout": "^4.6.0",
|
|
51
|
+
"@0xsequence/metadata": "^2.2.13",
|
|
52
|
+
"@0xsequence/network": "^2.2.13",
|
|
53
|
+
"@tanstack/react-query": "^5.66.0",
|
|
54
54
|
"react": "^18.3.1",
|
|
55
55
|
"react-dom": "^18.3.1",
|
|
56
|
-
"viem": "^2.
|
|
57
|
-
"wagmi": "^2.14.
|
|
56
|
+
"viem": "^2.23.2",
|
|
57
|
+
"wagmi": "^2.14.11"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"@testing-library/react": "^16.2.0",
|
|
63
63
|
"@types/react": "^18.3.18",
|
|
64
64
|
"@types/react-dom": "^18.3.5",
|
|
65
|
-
"@vanilla-extract/css": "^1.17.
|
|
66
|
-
"@vanilla-extract/esbuild-plugin": "^2.3.
|
|
65
|
+
"@vanilla-extract/css": "^1.17.1",
|
|
66
|
+
"@vanilla-extract/esbuild-plugin": "^2.3.15",
|
|
67
67
|
"@vanilla-extract/recipes": "^0.5.5",
|
|
68
68
|
"@vanilla-extract/vite-plugin": "^4.0.19",
|
|
69
69
|
"ctix": "^2.7.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// marketplace-api
|
|
2
|
+
// marketplace-api 8d0cafb3a02c5db5bdd5d6b139a752349e301f0c
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
export const WebrpcHeader = "Webrpc"
|
|
9
9
|
|
|
10
|
-
export const WebrpcHeaderValue = "webrpc@v0.22.1;gen-typescript@v0.16.2;marketplace-api@v0.0.0-
|
|
10
|
+
export const WebrpcHeaderValue = "webrpc@v0.22.1;gen-typescript@v0.16.2;marketplace-api@v0.0.0-8d0cafb3a02c5db5bdd5d6b139a752349e301f0c"
|
|
11
11
|
|
|
12
12
|
// WebRPC description and code-gen version
|
|
13
13
|
export const WebRPCVersion = "v1"
|
|
@@ -16,7 +16,7 @@ export const WebRPCVersion = "v1"
|
|
|
16
16
|
export const WebRPCSchemaVersion = ""
|
|
17
17
|
|
|
18
18
|
// Schema hash generated from your RIDL schema
|
|
19
|
-
export const WebRPCSchemaHash = "
|
|
19
|
+
export const WebRPCSchemaHash = "8d0cafb3a02c5db5bdd5d6b139a752349e301f0c"
|
|
20
20
|
|
|
21
21
|
type WebrpcGenVersions = {
|
|
22
22
|
webrpcGenVersion: string;
|
|
@@ -350,6 +350,8 @@ export interface FeeBreakdown {
|
|
|
350
350
|
export interface CollectibleOrder {
|
|
351
351
|
metadata: TokenMetadata
|
|
352
352
|
order?: Order
|
|
353
|
+
listing?: Order
|
|
354
|
+
offer?: Order
|
|
353
355
|
}
|
|
354
356
|
|
|
355
357
|
export interface OrderFilter {
|
|
@@ -2119,3 +2121,4 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
2119
2121
|
}
|
|
2120
2122
|
|
|
2121
2123
|
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
|
|
2124
|
+
|
|
@@ -50,6 +50,10 @@ class CollectionKeys {
|
|
|
50
50
|
class BalanceQueries {
|
|
51
51
|
static all = ['balances'] as const;
|
|
52
52
|
static lists = [...BalanceQueries.all, 'tokenBalances'] as const;
|
|
53
|
+
static collectionBalanceDetails = [
|
|
54
|
+
...BalanceQueries.all,
|
|
55
|
+
'collectionBalanceDetails',
|
|
56
|
+
] as const;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
// biome-ignore lint/complexity/noStaticOnlyClass:
|
package/src/react/hooks/index.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from './useAutoSelectFeeOption';
|
|
1
2
|
export * from './useBalanceOfCollectible';
|
|
2
3
|
export * from './useCountOfCollectables';
|
|
3
4
|
export * from './useCollectible';
|
|
4
5
|
export * from './useCollection';
|
|
6
|
+
export * from './useCollectionBalanceDetails';
|
|
5
7
|
export * from './useConfig';
|
|
6
8
|
export * from './useCurrencies';
|
|
7
9
|
export * from './useCurrencyOptions';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import { useAccount, useConfig } from 'wagmi';
|
|
3
|
+
import type { FeeOption } from '../ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect';
|
|
4
|
+
import { getBalance } from 'wagmi/actions';
|
|
5
|
+
import { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
type Error =
|
|
8
|
+
| 'User not connected'
|
|
9
|
+
| 'No options provided'
|
|
10
|
+
| 'Insufficient balance for any fee option'
|
|
11
|
+
| 'Failed to check balances';
|
|
12
|
+
|
|
13
|
+
type UseAutoSelectFeeOptionArgs = {
|
|
14
|
+
pendingFeeOptionConfirmation: {
|
|
15
|
+
id: string;
|
|
16
|
+
options: FeeOption[] | undefined;
|
|
17
|
+
chainId: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type AutoSelectFeeOptionResult = Promise<{
|
|
22
|
+
selectedOption: FeeOption | null;
|
|
23
|
+
error: Error | null;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Automatically selects the first fee option that user has enough balance for
|
|
29
|
+
* @param pendingFeeOptionConfirmation
|
|
30
|
+
* @returns The selected fee option, an error message if any, and a loading flag
|
|
31
|
+
*/
|
|
32
|
+
export function useAutoSelectFeeOption({
|
|
33
|
+
pendingFeeOptionConfirmation,
|
|
34
|
+
}: UseAutoSelectFeeOptionArgs): AutoSelectFeeOptionResult {
|
|
35
|
+
const { address: userAddress } = useAccount();
|
|
36
|
+
const config = useConfig();
|
|
37
|
+
|
|
38
|
+
const findAffordableOption = useCallback(async () => {
|
|
39
|
+
if (!userAddress) {
|
|
40
|
+
return {
|
|
41
|
+
selectedOption: null,
|
|
42
|
+
error: 'User not connected' as Error,
|
|
43
|
+
isLoading: false,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!pendingFeeOptionConfirmation.options) {
|
|
48
|
+
return {
|
|
49
|
+
selectedOption: null,
|
|
50
|
+
error: 'No options provided' as Error,
|
|
51
|
+
isLoading: false,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
// Try each option until we find an affordable one
|
|
57
|
+
for (const option of pendingFeeOptionConfirmation.options) {
|
|
58
|
+
if (!option.token.contractAddress) continue;
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
const balance = await getBalance(config, {
|
|
62
|
+
address: userAddress as Address,
|
|
63
|
+
token: option.token.contractAddress as Address,
|
|
64
|
+
chainId: pendingFeeOptionConfirmation.chainId,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const optionValue = BigInt(option.value);
|
|
68
|
+
if (balance.value >= optionValue) {
|
|
69
|
+
return {
|
|
70
|
+
selectedOption: option,
|
|
71
|
+
error: null,
|
|
72
|
+
isLoading: false,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error(
|
|
77
|
+
'Error fetching balance for currency:',
|
|
78
|
+
option.token.contractAddress,
|
|
79
|
+
error,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
selectedOption: null,
|
|
86
|
+
error: 'Insufficient balance for any fee option' as Error,
|
|
87
|
+
isLoading: false,
|
|
88
|
+
};
|
|
89
|
+
} catch (error) {
|
|
90
|
+
return {
|
|
91
|
+
selectedOption: null,
|
|
92
|
+
error: 'Failed to check balances' as Error,
|
|
93
|
+
isLoading: false,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}, [
|
|
97
|
+
pendingFeeOptionConfirmation.options,
|
|
98
|
+
pendingFeeOptionConfirmation.chainId,
|
|
99
|
+
userAddress,
|
|
100
|
+
config,
|
|
101
|
+
]);
|
|
102
|
+
|
|
103
|
+
return findAffordableOption();
|
|
104
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
2
|
import { useCancelTransactionSteps } from './useCancelTransactionSteps';
|
|
3
3
|
import type { MarketplaceKind } from '../../types';
|
|
4
|
+
import { useWaasFeeOptions } from '@0xsequence/kit';
|
|
5
|
+
import { useAutoSelectFeeOption } from './useAutoSelectFeeOption';
|
|
4
6
|
|
|
5
7
|
interface UseCancelOrderArgs {
|
|
6
8
|
collectionAddress: string;
|
|
@@ -29,6 +31,60 @@ export const useCancelOrder = ({
|
|
|
29
31
|
const [cancellingOrderId, setCancellingOrderId] = useState<string | null>(
|
|
30
32
|
null,
|
|
31
33
|
);
|
|
34
|
+
const [pendingFeeOptionConfirmation, confirmPendingFeeOption] =
|
|
35
|
+
useWaasFeeOptions();
|
|
36
|
+
const autoSelectFeeOptionResult = useAutoSelectFeeOption({
|
|
37
|
+
pendingFeeOptionConfirmation: pendingFeeOptionConfirmation
|
|
38
|
+
? {
|
|
39
|
+
id: pendingFeeOptionConfirmation.id,
|
|
40
|
+
options: pendingFeeOptionConfirmation.options?.map((opt) => ({
|
|
41
|
+
...opt,
|
|
42
|
+
token: {
|
|
43
|
+
...opt.token,
|
|
44
|
+
contractAddress: opt.token.contractAddress || null,
|
|
45
|
+
decimals: opt.token.decimals || 0,
|
|
46
|
+
tokenID: opt.token.tokenID || null,
|
|
47
|
+
},
|
|
48
|
+
})),
|
|
49
|
+
chainId: Number(chainId),
|
|
50
|
+
}
|
|
51
|
+
: {
|
|
52
|
+
id: '',
|
|
53
|
+
options: undefined,
|
|
54
|
+
chainId: Number(chainId),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const handleFeeOptionSelection = async () => {
|
|
60
|
+
if (!pendingFeeOptionConfirmation) return;
|
|
61
|
+
|
|
62
|
+
const { selectedOption, error } = await autoSelectFeeOptionResult;
|
|
63
|
+
|
|
64
|
+
if (error) {
|
|
65
|
+
console.error('Error selecting fee option:', error);
|
|
66
|
+
onError?.(new Error(`Failed to select fee option: ${error}`));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (
|
|
71
|
+
selectedOption?.token.contractAddress &&
|
|
72
|
+
pendingFeeOptionConfirmation.id
|
|
73
|
+
) {
|
|
74
|
+
confirmPendingFeeOption(
|
|
75
|
+
pendingFeeOptionConfirmation.id,
|
|
76
|
+
selectedOption.token.contractAddress,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
handleFeeOptionSelection();
|
|
82
|
+
}, [
|
|
83
|
+
pendingFeeOptionConfirmation,
|
|
84
|
+
autoSelectFeeOptionResult,
|
|
85
|
+
confirmPendingFeeOption,
|
|
86
|
+
onError,
|
|
87
|
+
]);
|
|
32
88
|
|
|
33
89
|
const { cancelOrder: cancelOrderBase } = useCancelTransactionSteps({
|
|
34
90
|
collectionAddress,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
AddressSchema,
|
|
4
|
+
ChainIdSchema,
|
|
5
|
+
QueryArgSchema,
|
|
6
|
+
balanceQueries,
|
|
7
|
+
getIndexerClient,
|
|
8
|
+
} from '../_internal';
|
|
9
|
+
import { queryOptions, useQuery } from '@tanstack/react-query';
|
|
10
|
+
import { useConfig } from './useConfig';
|
|
11
|
+
import type { GetTokenBalancesDetailsReturn } from '@0xsequence/indexer';
|
|
12
|
+
import type { SdkConfig } from '../../types';
|
|
13
|
+
|
|
14
|
+
const filterSchema = z.object({
|
|
15
|
+
accountAddresses: z.array(AddressSchema),
|
|
16
|
+
contractWhitelist: z.array(AddressSchema).optional(),
|
|
17
|
+
omitNativeBalances: z.boolean(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const useCollectionBalanceDetailsArgsSchema = z.object({
|
|
21
|
+
chainId: ChainIdSchema.pipe(z.coerce.number()),
|
|
22
|
+
filter: filterSchema,
|
|
23
|
+
query: QueryArgSchema.optional(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export type CollectionBalanceFilter = z.infer<typeof filterSchema>;
|
|
27
|
+
export type UseCollectionBalanceDetailsArgs = z.input<
|
|
28
|
+
typeof useCollectionBalanceDetailsArgsSchema
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
const fetchCollectionBalanceDetails = async (
|
|
32
|
+
args: UseCollectionBalanceDetailsArgs,
|
|
33
|
+
indexerClient: Awaited<ReturnType<typeof getIndexerClient>>,
|
|
34
|
+
) => {
|
|
35
|
+
const promises = args.filter.accountAddresses.map((accountAddress) =>
|
|
36
|
+
indexerClient.getTokenBalancesDetails({
|
|
37
|
+
filter: {
|
|
38
|
+
accountAddresses: [accountAddress],
|
|
39
|
+
contractWhitelist: args.filter.contractWhitelist,
|
|
40
|
+
omitNativeBalances: args.filter.omitNativeBalances,
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const responses = await Promise.all(promises);
|
|
46
|
+
const mergedResponse = responses.reduce<GetTokenBalancesDetailsReturn>(
|
|
47
|
+
(acc, curr) => {
|
|
48
|
+
if (!curr) return acc;
|
|
49
|
+
return {
|
|
50
|
+
page: curr.page,
|
|
51
|
+
nativeBalances: [
|
|
52
|
+
...(acc.nativeBalances || []),
|
|
53
|
+
...(curr.nativeBalances || []),
|
|
54
|
+
],
|
|
55
|
+
balances: [...(acc.balances || []), ...(curr.balances || [])],
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
{ page: {}, nativeBalances: [], balances: [] },
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (!mergedResponse) {
|
|
62
|
+
throw new Error('Failed to fetch collection balance details');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return mergedResponse;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const collectionBalanceDetailsOptions = (
|
|
69
|
+
args: UseCollectionBalanceDetailsArgs,
|
|
70
|
+
config: SdkConfig,
|
|
71
|
+
) => {
|
|
72
|
+
const parsedArgs = useCollectionBalanceDetailsArgsSchema.parse(args);
|
|
73
|
+
const indexerClient = getIndexerClient(parsedArgs.chainId, config);
|
|
74
|
+
|
|
75
|
+
return queryOptions({
|
|
76
|
+
queryKey: [...balanceQueries.collectionBalanceDetails, args, config],
|
|
77
|
+
queryFn: () => fetchCollectionBalanceDetails(parsedArgs, indexerClient),
|
|
78
|
+
...args.query,
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const useCollectionBalanceDetails = (
|
|
83
|
+
args: UseCollectionBalanceDetailsArgs,
|
|
84
|
+
) => {
|
|
85
|
+
const config = useConfig();
|
|
86
|
+
return useQuery(collectionBalanceDetailsOptions(args, config));
|
|
87
|
+
};
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
Order,
|
|
10
10
|
OrderbookKind,
|
|
11
11
|
} from '../../../_internal';
|
|
12
|
-
import { useCurrency
|
|
12
|
+
import { useCurrency } from '../../../hooks';
|
|
13
13
|
import SvgDiamondEyeIcon from '../../icons/DiamondEye';
|
|
14
14
|
import ChessTileImage from '../../images/chess-tile.png';
|
|
15
15
|
import { ActionButton } from '../_internals/action-button/ActionButton';
|
|
@@ -95,13 +95,8 @@ export function CollectibleCard({
|
|
|
95
95
|
onCannotPerformAction,
|
|
96
96
|
}: CollectibleCardProps) {
|
|
97
97
|
const collectibleMetadata = lowestListing?.metadata;
|
|
98
|
+
const highestOffer = lowestListing?.offer
|
|
98
99
|
const [imageLoadingError, setImageLoadingError] = useState(false);
|
|
99
|
-
const { data: highestOffer, isLoading: highestOfferLoading } =
|
|
100
|
-
useHighestOffer({
|
|
101
|
-
chainId: String(chainId),
|
|
102
|
-
collectionAddress,
|
|
103
|
-
tokenId: collectibleId,
|
|
104
|
-
});
|
|
105
100
|
|
|
106
101
|
const { data: lowestListingCurrency } = useCurrency({
|
|
107
102
|
chainId,
|
|
@@ -111,13 +106,13 @@ export function CollectibleCard({
|
|
|
111
106
|
enabled: !!lowestListing?.order?.priceCurrencyAddress,
|
|
112
107
|
},
|
|
113
108
|
});
|
|
114
|
-
if (
|
|
109
|
+
if (cardLoading) {
|
|
115
110
|
return <CollectibleSkeleton />;
|
|
116
111
|
}
|
|
117
112
|
|
|
118
113
|
const action = (
|
|
119
114
|
balance
|
|
120
|
-
? (highestOffer
|
|
115
|
+
? (highestOffer && CollectibleCardAction.SELL) ||
|
|
121
116
|
(!lowestListing?.order && CollectibleCardAction.LIST) ||
|
|
122
117
|
CollectibleCardAction.TRANSFER
|
|
123
118
|
: (lowestListing?.order && CollectibleCardAction.BUY) ||
|
|
@@ -158,6 +153,8 @@ export function CollectibleCard({
|
|
|
158
153
|
<IconButton
|
|
159
154
|
as="a"
|
|
160
155
|
href={externalUrl}
|
|
156
|
+
target="_blank"
|
|
157
|
+
rel="noopener noreferrer"
|
|
161
158
|
size="sm"
|
|
162
159
|
backdropFilter="blur"
|
|
163
160
|
variant="glass"
|
|
@@ -165,6 +162,7 @@ export function CollectibleCard({
|
|
|
165
162
|
e.stopPropagation();
|
|
166
163
|
}}
|
|
167
164
|
position="absolute"
|
|
165
|
+
zIndex="20"
|
|
168
166
|
top="2"
|
|
169
167
|
left="2"
|
|
170
168
|
icon={SvgDiamondEyeIcon}
|
|
@@ -181,8 +179,8 @@ export function CollectibleCard({
|
|
|
181
179
|
<Footer
|
|
182
180
|
name={name || ''}
|
|
183
181
|
type={collectionType}
|
|
184
|
-
onOfferClick={() => onOfferClick?.({ order: highestOffer
|
|
185
|
-
highestOffer={highestOffer
|
|
182
|
+
onOfferClick={() => onOfferClick?.({ order: highestOffer })}
|
|
183
|
+
highestOffer={highestOffer}
|
|
186
184
|
lowestListingPriceAmount={lowestListing?.order?.priceAmount}
|
|
187
185
|
lowestListingCurrency={lowestListingCurrency}
|
|
188
186
|
balance={balance}
|
|
@@ -202,7 +200,7 @@ export function CollectibleCard({
|
|
|
202
200
|
tokenId={collectibleId}
|
|
203
201
|
orderbookKind={orderbookKind}
|
|
204
202
|
action={action}
|
|
205
|
-
highestOffer={highestOffer
|
|
203
|
+
highestOffer={highestOffer}
|
|
206
204
|
lowestListing={lowestListing?.order}
|
|
207
205
|
owned={!!balance}
|
|
208
206
|
onCannotPerformAction={onCannotPerformAction}
|
|
@@ -9,7 +9,7 @@ export const collectibleCard = style([
|
|
|
9
9
|
border: '1px solid hsla(247, 100%, 75%, 1)',
|
|
10
10
|
boxShadow: '0px 0px 0px 1px hsla(247, 100%, 75%, 1)',
|
|
11
11
|
},
|
|
12
|
-
':focus': {
|
|
12
|
+
':focus-visible': {
|
|
13
13
|
border: '1px solid hsla(247, 100%, 75%, 1)',
|
|
14
14
|
boxShadow: '0px 0px 0px 2px hsla(247, 100%, 75%, 1)',
|
|
15
15
|
outline: '4px solid hsla(254, 100%, 57%, 1)',
|
|
@@ -13,8 +13,8 @@ const Svg = () => (
|
|
|
13
13
|
>
|
|
14
14
|
<title id="cart-title">Cart Icon</title>
|
|
15
15
|
<path
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
fillRule="evenodd"
|
|
17
|
+
clipRule="evenodd"
|
|
18
18
|
d="M2.5 3.46836C2.5 3.20969 2.72366 3 2.99955 3H5.16925C5.88938 3 6.5077 3.48022 6.64172 4.14359L8.33188 12.5093C8.37655 12.7304 8.58266 12.8905 8.8227 12.8905H16.987C17.2629 12.8905 17.4866 13.1002 17.4866 13.3589C17.4866 13.6175 17.2629 13.8272 16.987 13.8272H8.8227C8.10257 13.8272 7.48425 13.347 7.35023 12.6836L5.66007 4.31793C5.6154 4.0968 5.40929 3.93673 5.16925 3.93673H2.99955C2.72366 3.93673 2.5 3.72704 2.5 3.46836Z"
|
|
19
19
|
fill="white"
|
|
20
20
|
/>
|
|
@@ -117,17 +117,20 @@ export const useBuyCollectable = ({
|
|
|
117
117
|
enableSwapPayments: !!input.checkoutOptions.swap,
|
|
118
118
|
creditCardProviders: input.checkoutOptions.nftCheckout || [],
|
|
119
119
|
onSuccess: (hash: string) => {
|
|
120
|
+
callbacks?.onSuccess?.({ hash: hash as Hash });
|
|
121
|
+
},
|
|
122
|
+
onError: callbacks?.onError,
|
|
123
|
+
onClose: () => {
|
|
120
124
|
invalidateQueries([
|
|
121
125
|
collectableKeys.listings,
|
|
126
|
+
collectableKeys.lowestListings,
|
|
122
127
|
collectableKeys.listingsCount,
|
|
123
128
|
collectableKeys.lists,
|
|
124
129
|
collectableKeys.userBalances,
|
|
125
130
|
balanceQueries.all,
|
|
131
|
+
balanceQueries.collectionBalanceDetails,
|
|
126
132
|
]);
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
onError: callbacks?.onError,
|
|
130
|
-
onClose: () => {
|
|
133
|
+
|
|
131
134
|
buyModal$.close();
|
|
132
135
|
},
|
|
133
136
|
});
|
|
@@ -62,7 +62,11 @@ const useHandleTransfer = () => {
|
|
|
62
62
|
collectibleId,
|
|
63
63
|
price: undefined,
|
|
64
64
|
type: TransactionType.TRANSFER,
|
|
65
|
-
queriesToInvalidate: [
|
|
65
|
+
queriesToInvalidate: [
|
|
66
|
+
balanceQueries.all,
|
|
67
|
+
balanceQueries.collectionBalanceDetails,
|
|
68
|
+
collectableKeys.userBalances,
|
|
69
|
+
],
|
|
66
70
|
});
|
|
67
71
|
} catch (error) {
|
|
68
72
|
transferModal$.view.set('enterReceiverAddress');
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/consts.ts","./src/index.ts","./src/react/index.ts","./src/react/provider.tsx","./src/react/__tests__/provider.test.tsx","./src/react/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/logger.ts","./src/react/_internal/test-utils.tsx","./src/react/_internal/types.ts","./src/react/_internal/utils.ts","./src/react/_internal/api/get-query-client.ts","./src/react/_internal/api/index.ts","./src/react/_internal/api/marketplace-api.ts","./src/react/_internal/api/marketplace.gen.ts","./src/react/_internal/api/query-keys.ts","./src/react/_internal/api/services.ts","./src/react/_internal/api/zod-schema.ts","./src/react/_internal/api/__mocks__/marketplace.msw.ts","./src/react/_internal/wagmi/create-config.ts","./src/react/_internal/wagmi/embedded.ts","./src/react/_internal/wagmi/index.ts","./src/react/_internal/wagmi/universal.ts","./src/react/_internal/wagmi/__tests__/create-config.test.ts","./src/react/_internal/wallet/usewallet.ts","./src/react/_internal/wallet/wallet.ts","./src/react/hooks/index.ts","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usecancelorder.tsx","./src/react/hooks/usecanceltransactionsteps.tsx","./src/react/hooks/usecheckoutoptions.tsx","./src/react/hooks/usecollectible.tsx","./src/react/hooks/usecollection.tsx","./src/react/hooks/usecollectiondetails.tsx","./src/react/hooks/usecollectiondetailspolling.tsx","./src/react/hooks/useconfig.tsx","./src/react/hooks/usecountlistingsforcollectible.tsx","./src/react/hooks/usecountofcollectables.tsx","./src/react/hooks/usecountoffersforcollectible.tsx","./src/react/hooks/usecurrencies.tsx","./src/react/hooks/usecurrency.tsx","./src/react/hooks/usecurrencybalance.tsx","./src/react/hooks/usecurrencyoptions.tsx","./src/react/hooks/usefilters.tsx","./src/react/hooks/usefloororder.tsx","./src/react/hooks/usegeneratebuytransaction.tsx","./src/react/hooks/usegeneratecanceltransaction.tsx","./src/react/hooks/usegeneratelistingtransaction.tsx","./src/react/hooks/usegenerateoffertransaction.tsx","./src/react/hooks/usegenerateselltransaction.tsx","./src/react/hooks/usegetreceiptfromhash.tsx","./src/react/hooks/usehighestoffer.tsx","./src/react/hooks/uselistbalances.tsx","./src/react/hooks/uselistcollectibleactivities.tsx","./src/react/hooks/uselistcollectibles.tsx","./src/react/hooks/uselistcollectionactivities.tsx","./src/react/hooks/uselistcollections.tsx","./src/react/hooks/uselistlistingsforcollectible.tsx","./src/react/hooks/uselistoffersforcollectible.tsx","./src/react/hooks/uselowestlisting.tsx","./src/react/hooks/usemarketplaceconfig.tsx","./src/react/hooks/useroyaltypercentage.tsx","./src/react/hooks/usetransfertokens.tsx","./src/react/hooks/options/marketplaceconfigoptions.ts","./src/react/hooks/options/__mocks__/marketplaceconfig.msw.ts","./src/react/hooks/options/__tests__/marketplaceconfigoptions.test.tsx","./src/react/ssr/create-ssr-client.ts","./src/react/ssr/index.ts","./src/react/ui/index.ts","./src/react/ui/components/_internals/action-button/actionbutton.tsx","./src/react/ui/components/_internals/action-button/store.ts","./src/react/ui/components/_internals/action-button/styles.css.ts","./src/react/ui/components/_internals/action-button/types.ts","./src/react/ui/components/_internals/action-button/components/actionbuttonbody.tsx","./src/react/ui/components/_internals/action-button/components/nonowneractions.tsx","./src/react/ui/components/_internals/action-button/components/owneractions.tsx","./src/react/ui/components/_internals/action-button/hooks/useactionbuttonlogic.ts","./src/react/ui/components/_internals/custom-network-image/customnetworkimage.tsx","./src/react/ui/components/_internals/custom-network-image/styles.css.ts","./src/react/ui/components/_internals/custom-select/customselect.tsx","./src/react/ui/components/_internals/custom-select/styles.css.ts","./src/react/ui/components/_internals/custom-select/__tests__/customselect.test.tsx","./src/react/ui/components/_internals/pill/pill.tsx","./src/react/ui/components/collectible-card/collectiblecard.tsx","./src/react/ui/components/collectible-card/footer.tsx","./src/react/ui/components/collectible-card/index.ts","./src/react/ui/components/collectible-card/styles.css.ts","./src/react/ui/components/marketplace-logos/index.ts","./src/react/ui/components/marketplace-logos/marketplace-logos.tsx","./src/react/ui/icons/arrowup.tsx","./src/react/ui/icons/bell.tsx","./src/react/ui/icons/calendaricon.tsx","./src/react/ui/icons/carticon.tsx","./src/react/ui/icons/diamondeye.tsx","./src/react/ui/icons/infoicon.tsx","./src/react/ui/icons/inventoryicon.tsx","./src/react/ui/icons/minusicon.tsx","./src/react/ui/icons/plusicon.tsx","./src/react/ui/icons/positivecircleicon.tsx","./src/react/ui/icons/index.ts","./src/react/ui/icons/styles.css.ts","./src/react/ui/modals/modal-provider.tsx","./src/react/ui/modals/buymodal/modal.tsx","./src/react/ui/modals/buymodal/index.tsx","./src/react/ui/modals/buymodal/store.ts","./src/react/ui/modals/buymodal/__tests__/modal.test.tsx","./src/react/ui/modals/buymodal/__tests__/store.test.ts","./src/react/ui/modals/buymodal/hooks/usebuycollectable.ts","./src/react/ui/modals/buymodal/hooks/usecheckoutoptions.ts","./src/react/ui/modals/buymodal/hooks/usefees.ts","./src/react/ui/modals/buymodal/hooks/useloaddata.ts","./src/react/ui/modals/buymodal/hooks/__tests__/usebuycollectable.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/usecheckoutoptions.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/usefees.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/useloaddata.test.tsx","./src/react/ui/modals/buymodal/modals/checkoutmodal.tsx","./src/react/ui/modals/buymodal/modals/modal1155.tsx","./src/react/ui/modals/buymodal/modals/__tests__/checkoutmodal.test.tsx","./src/react/ui/modals/buymodal/modals/__tests__/modal1155.test.tsx","./src/react/ui/modals/createlistingmodal/modal.tsx","./src/react/ui/modals/createlistingmodal/index.tsx","./src/react/ui/modals/createlistingmodal/store.ts","./src/react/ui/modals/createlistingmodal/__tests__/modal.test.tsx","./src/react/ui/modals/createlistingmodal/hooks/usecreatelisting.tsx","./src/react/ui/modals/createlistingmodal/hooks/usegettokenapproval.ts","./src/react/ui/modals/createlistingmodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/makeoffermodal/modal.tsx","./src/react/ui/modals/makeoffermodal/index.tsx","./src/react/ui/modals/makeoffermodal/store.ts","./src/react/ui/modals/makeoffermodal/__tests__/modal.test.tsx","./src/react/ui/modals/makeoffermodal/hooks/usegettokenapproval.tsx","./src/react/ui/modals/makeoffermodal/hooks/usemakeoffer.tsx","./src/react/ui/modals/makeoffermodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/sellmodal/modal.tsx","./src/react/ui/modals/sellmodal/index.tsx","./src/react/ui/modals/sellmodal/store.ts","./src/react/ui/modals/sellmodal/utils.ts","./src/react/ui/modals/sellmodal/__tests__/modal.test.tsx","./src/react/ui/modals/sellmodal/hooks/usegettokenapproval.tsx","./src/react/ui/modals/sellmodal/hooks/usesell.tsx","./src/react/ui/modals/sellmodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/successfulpurchasemodal/_store.ts","./src/react/ui/modals/successfulpurchasemodal/index.tsx","./src/react/ui/modals/successfulpurchasemodal/styles.css.ts","./src/react/ui/modals/successfulpurchasemodal/__tests__/modal.test.tsx","./src/react/ui/modals/transfermodal/_store.ts","./src/react/ui/modals/transfermodal/index.tsx","./src/react/ui/modals/transfermodal/messages.ts","./src/react/ui/modals/transfermodal/styles.css.ts","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/index.tsx","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/usehandletransfer.tsx","./src/react/ui/modals/transfermodal/_views/followwalletinstructions/index.tsx","./src/react/ui/modals/_internal/types.ts","./src/react/ui/modals/_internal/components/actionmodal/actionmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/errormodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/loadingmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/index.ts","./src/react/ui/modals/_internal/components/actionmodal/store.ts","./src/react/ui/modals/_internal/components/actionmodal/styles.css.ts","./src/react/ui/modals/_internal/components/alertmessage/index.tsx","./src/react/ui/modals/_internal/components/alertmessage/styles.css.ts","./src/react/ui/modals/_internal/components/calendar/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/styles.css.ts","./src/react/ui/modals/_internal/components/currencyimage/index.tsx","./src/react/ui/modals/_internal/components/currencyoptionsselect/index.tsx","./src/react/ui/modals/_internal/components/currencyoptionsselect/__tests__/index.test.tsx","./src/react/ui/modals/_internal/components/expirationdateselect/index.tsx","./src/react/ui/modals/_internal/components/floorpricetext/index.tsx","./src/react/ui/modals/_internal/components/priceinput/index.tsx","./src/react/ui/modals/_internal/components/priceinput/styles.css.ts","./src/react/ui/modals/_internal/components/priceinput/types.ts","./src/react/ui/modals/_internal/components/priceinput/__tests__/index.test.tsx","./src/react/ui/modals/_internal/components/quantityinput/index.tsx","./src/react/ui/modals/_internal/components/quantityinput/styles.css.ts","./src/react/ui/modals/_internal/components/switchchainmodal/index.tsx","./src/react/ui/modals/_internal/components/switchchainmodal/store.ts","./src/react/ui/modals/_internal/components/switchchainmodal/styles.css.ts","./src/react/ui/modals/_internal/components/switchchainmodal/__tests__/switchchainmodal.test.tsx","./src/react/ui/modals/_internal/components/timeago/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/styles.css.ts","./src/react/ui/modals/_internal/components/transaction-footer/index.tsx","./src/react/ui/modals/_internal/components/transactiondetails/index.tsx","./src/react/ui/modals/_internal/components/transactionheader/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/consts.ts","./src/react/ui/modals/_internal/components/transactionpreview/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/usetransactionpreviewtitle.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/index.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/store.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/styles.css.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/__tests__/transactionstatusmodal.test.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/__tests__/utils.test.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/hooks/usetransactionstatus.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/getformattedtype.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/getmessage.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/gettitle.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/index.tsx","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/store.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/styles.css.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsselect/waasfeeoptionsselect.tsx","./src/react/ui/modals/_internal/stores/accountmodal.ts","./src/react/ui/styles/index.ts","./src/react/ui/styles/modal.css.ts","./src/styles/index.ts","./src/types/api-types.ts","./src/types/custom.d.ts","./src/types/index.ts","./src/types/marketplace-config.ts","./src/types/messages.ts","./src/types/sdk-config.ts","./src/types/types.ts","./src/utils/address.ts","./src/utils/date.ts","./src/utils/get-public-rpc-client.ts","./src/utils/getmarketplacedetails.ts","./src/utils/index.ts","./src/utils/network.ts","./src/utils/price.ts","./src/utils/__tests__/address.test.ts","./src/utils/__tests__/date.test.ts","./src/utils/__tests__/get-public-rpc-client.test.ts","./src/utils/__tests__/getmarketplacedetails.test.ts","./src/utils/__tests__/price.test.ts","./src/utils/_internal/error/base.ts","./src/utils/_internal/error/config.ts","./src/utils/_internal/error/context.ts","./src/utils/_internal/error/transaction.ts","./src/utils/abi/index.ts","./src/utils/abi/marketplace/eip2981.ts","./src/utils/abi/marketplace/index.ts","./src/utils/abi/marketplace/sequence-marketplace-v1.ts","./src/utils/abi/marketplace/sequence-marketplace-v2.ts","./src/utils/abi/token/erc1155.ts","./src/utils/abi/token/erc20.ts","./src/utils/abi/token/erc721.ts","./src/utils/abi/token/index.ts","./tsup.config.ts"],"version":"5.7.3"}
|
|
1
|
+
{"root":["./src/consts.ts","./src/index.ts","./src/react/index.ts","./src/react/provider.tsx","./src/react/__tests__/provider.test.tsx","./src/react/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/logger.ts","./src/react/_internal/test-utils.tsx","./src/react/_internal/types.ts","./src/react/_internal/utils.ts","./src/react/_internal/api/get-query-client.ts","./src/react/_internal/api/index.ts","./src/react/_internal/api/marketplace-api.ts","./src/react/_internal/api/marketplace.gen.ts","./src/react/_internal/api/query-keys.ts","./src/react/_internal/api/services.ts","./src/react/_internal/api/zod-schema.ts","./src/react/_internal/api/__mocks__/marketplace.msw.ts","./src/react/_internal/wagmi/create-config.ts","./src/react/_internal/wagmi/embedded.ts","./src/react/_internal/wagmi/index.ts","./src/react/_internal/wagmi/universal.ts","./src/react/_internal/wagmi/__tests__/create-config.test.ts","./src/react/_internal/wallet/usewallet.ts","./src/react/_internal/wallet/wallet.ts","./src/react/hooks/index.ts","./src/react/hooks/useautoselectfeeoption.tsx","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usecancelorder.tsx","./src/react/hooks/usecanceltransactionsteps.tsx","./src/react/hooks/usecheckoutoptions.tsx","./src/react/hooks/usecollectible.tsx","./src/react/hooks/usecollection.tsx","./src/react/hooks/usecollectionbalancedetails.tsx","./src/react/hooks/usecollectiondetails.tsx","./src/react/hooks/usecollectiondetailspolling.tsx","./src/react/hooks/useconfig.tsx","./src/react/hooks/usecountlistingsforcollectible.tsx","./src/react/hooks/usecountofcollectables.tsx","./src/react/hooks/usecountoffersforcollectible.tsx","./src/react/hooks/usecurrencies.tsx","./src/react/hooks/usecurrency.tsx","./src/react/hooks/usecurrencybalance.tsx","./src/react/hooks/usecurrencyoptions.tsx","./src/react/hooks/usefilters.tsx","./src/react/hooks/usefloororder.tsx","./src/react/hooks/usegeneratebuytransaction.tsx","./src/react/hooks/usegeneratecanceltransaction.tsx","./src/react/hooks/usegeneratelistingtransaction.tsx","./src/react/hooks/usegenerateoffertransaction.tsx","./src/react/hooks/usegenerateselltransaction.tsx","./src/react/hooks/usegetreceiptfromhash.tsx","./src/react/hooks/usehighestoffer.tsx","./src/react/hooks/uselistbalances.tsx","./src/react/hooks/uselistcollectibleactivities.tsx","./src/react/hooks/uselistcollectibles.tsx","./src/react/hooks/uselistcollectionactivities.tsx","./src/react/hooks/uselistcollections.tsx","./src/react/hooks/uselistlistingsforcollectible.tsx","./src/react/hooks/uselistoffersforcollectible.tsx","./src/react/hooks/uselowestlisting.tsx","./src/react/hooks/usemarketplaceconfig.tsx","./src/react/hooks/useroyaltypercentage.tsx","./src/react/hooks/usetransfertokens.tsx","./src/react/hooks/options/marketplaceconfigoptions.ts","./src/react/hooks/options/__mocks__/marketplaceconfig.msw.ts","./src/react/hooks/options/__tests__/marketplaceconfigoptions.test.tsx","./src/react/ssr/create-ssr-client.ts","./src/react/ssr/index.ts","./src/react/ui/index.ts","./src/react/ui/components/_internals/action-button/actionbutton.tsx","./src/react/ui/components/_internals/action-button/store.ts","./src/react/ui/components/_internals/action-button/styles.css.ts","./src/react/ui/components/_internals/action-button/types.ts","./src/react/ui/components/_internals/action-button/components/actionbuttonbody.tsx","./src/react/ui/components/_internals/action-button/components/nonowneractions.tsx","./src/react/ui/components/_internals/action-button/components/owneractions.tsx","./src/react/ui/components/_internals/action-button/hooks/useactionbuttonlogic.ts","./src/react/ui/components/_internals/custom-network-image/customnetworkimage.tsx","./src/react/ui/components/_internals/custom-network-image/styles.css.ts","./src/react/ui/components/_internals/custom-select/customselect.tsx","./src/react/ui/components/_internals/custom-select/styles.css.ts","./src/react/ui/components/_internals/custom-select/__tests__/customselect.test.tsx","./src/react/ui/components/_internals/pill/pill.tsx","./src/react/ui/components/collectible-card/collectiblecard.tsx","./src/react/ui/components/collectible-card/footer.tsx","./src/react/ui/components/collectible-card/index.ts","./src/react/ui/components/collectible-card/styles.css.ts","./src/react/ui/components/marketplace-logos/index.ts","./src/react/ui/components/marketplace-logos/marketplace-logos.tsx","./src/react/ui/icons/arrowup.tsx","./src/react/ui/icons/bell.tsx","./src/react/ui/icons/calendaricon.tsx","./src/react/ui/icons/carticon.tsx","./src/react/ui/icons/diamondeye.tsx","./src/react/ui/icons/infoicon.tsx","./src/react/ui/icons/inventoryicon.tsx","./src/react/ui/icons/minusicon.tsx","./src/react/ui/icons/plusicon.tsx","./src/react/ui/icons/positivecircleicon.tsx","./src/react/ui/icons/index.ts","./src/react/ui/icons/styles.css.ts","./src/react/ui/modals/modal-provider.tsx","./src/react/ui/modals/buymodal/modal.tsx","./src/react/ui/modals/buymodal/index.tsx","./src/react/ui/modals/buymodal/store.ts","./src/react/ui/modals/buymodal/__tests__/modal.test.tsx","./src/react/ui/modals/buymodal/__tests__/store.test.ts","./src/react/ui/modals/buymodal/hooks/usebuycollectable.ts","./src/react/ui/modals/buymodal/hooks/usecheckoutoptions.ts","./src/react/ui/modals/buymodal/hooks/usefees.ts","./src/react/ui/modals/buymodal/hooks/useloaddata.ts","./src/react/ui/modals/buymodal/hooks/__tests__/usebuycollectable.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/usecheckoutoptions.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/usefees.test.tsx","./src/react/ui/modals/buymodal/hooks/__tests__/useloaddata.test.tsx","./src/react/ui/modals/buymodal/modals/checkoutmodal.tsx","./src/react/ui/modals/buymodal/modals/modal1155.tsx","./src/react/ui/modals/buymodal/modals/__tests__/checkoutmodal.test.tsx","./src/react/ui/modals/buymodal/modals/__tests__/modal1155.test.tsx","./src/react/ui/modals/createlistingmodal/modal.tsx","./src/react/ui/modals/createlistingmodal/index.tsx","./src/react/ui/modals/createlistingmodal/store.ts","./src/react/ui/modals/createlistingmodal/__tests__/modal.test.tsx","./src/react/ui/modals/createlistingmodal/hooks/usecreatelisting.tsx","./src/react/ui/modals/createlistingmodal/hooks/usegettokenapproval.ts","./src/react/ui/modals/createlistingmodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/makeoffermodal/modal.tsx","./src/react/ui/modals/makeoffermodal/index.tsx","./src/react/ui/modals/makeoffermodal/store.ts","./src/react/ui/modals/makeoffermodal/__tests__/modal.test.tsx","./src/react/ui/modals/makeoffermodal/hooks/usegettokenapproval.tsx","./src/react/ui/modals/makeoffermodal/hooks/usemakeoffer.tsx","./src/react/ui/modals/makeoffermodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/sellmodal/modal.tsx","./src/react/ui/modals/sellmodal/index.tsx","./src/react/ui/modals/sellmodal/store.ts","./src/react/ui/modals/sellmodal/utils.ts","./src/react/ui/modals/sellmodal/__tests__/modal.test.tsx","./src/react/ui/modals/sellmodal/hooks/usegettokenapproval.tsx","./src/react/ui/modals/sellmodal/hooks/usesell.tsx","./src/react/ui/modals/sellmodal/hooks/usetransactionsteps.tsx","./src/react/ui/modals/successfulpurchasemodal/_store.ts","./src/react/ui/modals/successfulpurchasemodal/index.tsx","./src/react/ui/modals/successfulpurchasemodal/styles.css.ts","./src/react/ui/modals/successfulpurchasemodal/__tests__/modal.test.tsx","./src/react/ui/modals/transfermodal/_store.ts","./src/react/ui/modals/transfermodal/index.tsx","./src/react/ui/modals/transfermodal/messages.ts","./src/react/ui/modals/transfermodal/styles.css.ts","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/index.tsx","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/usehandletransfer.tsx","./src/react/ui/modals/transfermodal/_views/followwalletinstructions/index.tsx","./src/react/ui/modals/_internal/types.ts","./src/react/ui/modals/_internal/components/actionmodal/actionmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/errormodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/loadingmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/index.ts","./src/react/ui/modals/_internal/components/actionmodal/store.ts","./src/react/ui/modals/_internal/components/actionmodal/styles.css.ts","./src/react/ui/modals/_internal/components/alertmessage/index.tsx","./src/react/ui/modals/_internal/components/alertmessage/styles.css.ts","./src/react/ui/modals/_internal/components/calendar/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/styles.css.ts","./src/react/ui/modals/_internal/components/currencyimage/index.tsx","./src/react/ui/modals/_internal/components/currencyoptionsselect/index.tsx","./src/react/ui/modals/_internal/components/currencyoptionsselect/__tests__/index.test.tsx","./src/react/ui/modals/_internal/components/expirationdateselect/index.tsx","./src/react/ui/modals/_internal/components/floorpricetext/index.tsx","./src/react/ui/modals/_internal/components/priceinput/index.tsx","./src/react/ui/modals/_internal/components/priceinput/styles.css.ts","./src/react/ui/modals/_internal/components/priceinput/types.ts","./src/react/ui/modals/_internal/components/priceinput/__tests__/index.test.tsx","./src/react/ui/modals/_internal/components/quantityinput/index.tsx","./src/react/ui/modals/_internal/components/quantityinput/styles.css.ts","./src/react/ui/modals/_internal/components/switchchainmodal/index.tsx","./src/react/ui/modals/_internal/components/switchchainmodal/store.ts","./src/react/ui/modals/_internal/components/switchchainmodal/styles.css.ts","./src/react/ui/modals/_internal/components/switchchainmodal/__tests__/switchchainmodal.test.tsx","./src/react/ui/modals/_internal/components/timeago/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/styles.css.ts","./src/react/ui/modals/_internal/components/transaction-footer/index.tsx","./src/react/ui/modals/_internal/components/transactiondetails/index.tsx","./src/react/ui/modals/_internal/components/transactionheader/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/consts.ts","./src/react/ui/modals/_internal/components/transactionpreview/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/usetransactionpreviewtitle.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/index.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/store.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/styles.css.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/__tests__/transactionstatusmodal.test.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/__tests__/utils.test.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/hooks/usetransactionstatus.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/getformattedtype.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/getmessage.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/util/gettitle.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/index.tsx","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/store.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsbox/styles.css.ts","./src/react/ui/modals/_internal/components/waasfeeoptionsselect/waasfeeoptionsselect.tsx","./src/react/ui/modals/_internal/stores/accountmodal.ts","./src/react/ui/styles/index.ts","./src/react/ui/styles/modal.css.ts","./src/styles/index.ts","./src/types/api-types.ts","./src/types/custom.d.ts","./src/types/index.ts","./src/types/marketplace-config.ts","./src/types/messages.ts","./src/types/sdk-config.ts","./src/types/types.ts","./src/utils/address.ts","./src/utils/date.ts","./src/utils/get-public-rpc-client.ts","./src/utils/getmarketplacedetails.ts","./src/utils/index.ts","./src/utils/network.ts","./src/utils/price.ts","./src/utils/__tests__/address.test.ts","./src/utils/__tests__/date.test.ts","./src/utils/__tests__/get-public-rpc-client.test.ts","./src/utils/__tests__/getmarketplacedetails.test.ts","./src/utils/__tests__/price.test.ts","./src/utils/_internal/error/base.ts","./src/utils/_internal/error/config.ts","./src/utils/_internal/error/context.ts","./src/utils/_internal/error/transaction.ts","./src/utils/abi/index.ts","./src/utils/abi/marketplace/eip2981.ts","./src/utils/abi/marketplace/index.ts","./src/utils/abi/marketplace/sequence-marketplace-v1.ts","./src/utils/abi/marketplace/sequence-marketplace-v2.ts","./src/utils/abi/token/erc1155.ts","./src/utils/abi/token/erc20.ts","./src/utils/abi/token/erc721.ts","./src/utils/abi/token/index.ts","./tsup.config.ts"],"version":"5.7.3"}
|