@0xsequence/marketplace-sdk 0.4.8 → 0.4.9
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-6R4G7J6Q.js → chunk-7HWJ4DUX.js} +29 -5
- package/dist/chunk-7HWJ4DUX.js.map +1 -0
- package/dist/{chunk-7WCZP6FN.js → chunk-BJLOO4NP.js} +628 -369
- package/dist/chunk-BJLOO4NP.js.map +1 -0
- package/dist/{chunk-2OJB35FS.js → chunk-BMWCIHCB.js} +5 -5
- package/dist/{chunk-2OJB35FS.js.map → chunk-BMWCIHCB.js.map} +1 -1
- package/dist/{chunk-WRMJ5FZM.js → chunk-CUA4SGWT.js} +524 -18
- package/dist/chunk-CUA4SGWT.js.map +1 -0
- package/dist/{chunk-JEOUQFT3.js → chunk-TFCSNRD5.js} +4 -3
- package/dist/chunk-TFCSNRD5.js.map +1 -0
- package/dist/{chunk-AQT3BQ67.js → chunk-Y3KINNAU.js} +12 -5
- package/dist/chunk-Y3KINNAU.js.map +1 -0
- package/dist/{create-config-D5WqfUft.d.ts → create-config-CgYQDyMD.d.ts} +2 -2
- package/dist/index.css +31 -17
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{marketplace-config-C_fDWzz0.d.ts → marketplace-config-BP5-XnFG.d.ts} +1 -1
- package/dist/{marketplace.gen-B8S8fflj.d.ts → marketplace.gen-BzmWLP9L.d.ts} +14 -4
- package/dist/react/_internal/api/index.d.ts +2 -2
- package/dist/react/_internal/api/index.js +3 -1
- package/dist/react/_internal/index.d.ts +5 -5
- package/dist/react/_internal/index.js +3 -1
- package/dist/react/_internal/wagmi/index.d.ts +3 -3
- package/dist/react/hooks/index.d.ts +46 -5
- package/dist/react/hooks/index.js +10 -3
- package/dist/react/index.css +37 -17
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +13 -6
- package/dist/react/ui/components/collectible-card/index.css +37 -17
- package/dist/react/ui/components/collectible-card/index.css.map +1 -1
- package/dist/react/ui/components/collectible-card/index.d.ts +27 -4
- package/dist/react/ui/components/collectible-card/index.js +5 -6
- package/dist/react/ui/index.css +37 -17
- package/dist/react/ui/index.css.map +1 -1
- package/dist/react/ui/index.d.ts +3 -3
- package/dist/react/ui/index.js +5 -6
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +3 -3
- package/dist/{sdk-config-BXVH8PS2.d.ts → sdk-config-LbbmA85k.d.ts} +27 -7
- package/dist/{services-CdXAIjt1.d.ts → services-DW26ougH.d.ts} +1 -1
- package/dist/styles/index.css +31 -17
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/index.d.ts +2 -2
- package/dist/styles/index.js +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +1 -1
- package/dist/{types-eX4P9xju.d.ts → types-DhTZWw1U.d.ts} +2 -2
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/src/react/_internal/api/__mocks__/marketplace.msw.ts +4 -0
- package/src/react/_internal/api/marketplace.gen.ts +42 -7
- package/src/react/_internal/wallet/useWallet.ts +30 -46
- package/src/react/_internal/wallet/wallet.ts +52 -6
- package/src/react/hooks/index.ts +2 -0
- package/src/react/hooks/options/__mocks__/marketplaceConfig.msw.ts +10 -1
- package/src/react/hooks/useCollectionDetails.tsx +35 -0
- package/src/react/hooks/useCollectionDetailsPolling.tsx +60 -0
- package/src/react/ui/components/_internals/action-button/ActionButton.tsx +36 -118
- package/src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx +52 -0
- package/src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx +72 -0
- package/src/react/ui/components/_internals/action-button/components/OwnerActions.tsx +81 -0
- package/src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts +93 -0
- package/src/react/ui/components/_internals/action-button/store.ts +47 -0
- package/src/react/ui/components/_internals/action-button/styles.css.ts +8 -0
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +25 -6
- package/src/react/ui/components/collectible-card/Footer.tsx +5 -8
- package/src/react/ui/components/collectible-card/styles.css.ts +44 -31
- package/src/react/ui/icons/CartIcon.tsx +46 -0
- package/src/react/ui/modals/BuyModal/Modal.tsx +0 -2
- package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx +253 -0
- package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +100 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useBuyCollectable.test.tsx +402 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +267 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useFees.test.tsx +166 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useLoadData.test.tsx +209 -0
- package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +19 -17
- package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +9 -7
- package/src/react/ui/modals/BuyModal/modals/Modal1155.tsx +36 -18
- package/src/react/ui/modals/BuyModal/modals/__tests__/CheckoutModal.test.tsx +162 -0
- package/src/react/ui/modals/BuyModal/modals/__tests__/Modal1155.test.tsx +243 -0
- package/src/react/ui/modals/BuyModal/store.ts +11 -10
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +26 -3
- package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +141 -29
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +20 -11
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +13 -58
- package/src/react/ui/modals/_internal/components/priceInput/__tests__/index.test.tsx +2 -0
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +18 -19
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +2 -0
- package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +62 -0
- package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +53 -100
- package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +2 -10
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-6R4G7J6Q.js.map +0 -1
- package/dist/chunk-7WCZP6FN.js.map +0 -1
- package/dist/chunk-AQT3BQ67.js.map +0 -1
- package/dist/chunk-FWN2MCLI.js +0 -425
- package/dist/chunk-FWN2MCLI.js.map +0 -1
- package/dist/chunk-JEOUQFT3.js.map +0 -1
- package/dist/chunk-WRMJ5FZM.js.map +0 -1
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ActionModal,
|
|
4
4
|
CustomSelect,
|
|
5
5
|
useCurrencyBalance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y3KINNAU.js";
|
|
7
7
|
import {
|
|
8
8
|
CalendarIcon_default,
|
|
9
9
|
MinusIcon_default,
|
|
@@ -33,9 +33,11 @@ import {
|
|
|
33
33
|
quantityInputWrapper,
|
|
34
34
|
tokenPreview,
|
|
35
35
|
transferModalContent
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BMWCIHCB.js";
|
|
37
37
|
import {
|
|
38
|
+
AlertMessage,
|
|
38
39
|
dateToUnixTime,
|
|
40
|
+
switchChainModal_default,
|
|
39
41
|
useBalanceOfCollectible,
|
|
40
42
|
useCollectible,
|
|
41
43
|
useCollection,
|
|
@@ -51,20 +53,15 @@ import {
|
|
|
51
53
|
useLowestListing,
|
|
52
54
|
useMarketplaceConfig,
|
|
53
55
|
useRoyaltyPercentage,
|
|
54
|
-
useTransferTokens
|
|
55
|
-
} from "./chunk-WRMJ5FZM.js";
|
|
56
|
-
import {
|
|
57
|
-
AlertMessage,
|
|
58
|
-
switchChainModal_default,
|
|
59
56
|
useSwitchChainModal,
|
|
57
|
+
useTransferTokens,
|
|
60
58
|
useWallet
|
|
61
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-CUA4SGWT.js";
|
|
62
60
|
import {
|
|
63
61
|
iconVariants
|
|
64
62
|
} from "./chunk-LF44FCG5.js";
|
|
65
63
|
import {
|
|
66
64
|
calculatePriceDifferencePercentage,
|
|
67
|
-
getPublicRpcClient,
|
|
68
65
|
truncateMiddle
|
|
69
66
|
} from "./chunk-XP3WY5AX.js";
|
|
70
67
|
import {
|
|
@@ -75,17 +72,17 @@ import {
|
|
|
75
72
|
collectableKeys,
|
|
76
73
|
getMarketplaceClient,
|
|
77
74
|
getQueryClient
|
|
78
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-7HWJ4DUX.js";
|
|
79
76
|
import {
|
|
80
77
|
InvalidContractTypeError,
|
|
81
78
|
InvalidStepError
|
|
82
79
|
} from "./chunk-WM4RGBFQ.js";
|
|
83
80
|
|
|
84
81
|
// src/react/ui/modals/modal-provider.tsx
|
|
85
|
-
import { observer as
|
|
82
|
+
import { observer as observer11 } from "@legendapp/state/react";
|
|
86
83
|
|
|
87
84
|
// src/react/ui/modals/MakeOfferModal/Modal.tsx
|
|
88
|
-
import { Show, observer as
|
|
85
|
+
import { Show, observer as observer4 } from "@legendapp/state/react";
|
|
89
86
|
import { useState as useState6 } from "react";
|
|
90
87
|
import { parseUnits as parseUnits2 } from "viem";
|
|
91
88
|
|
|
@@ -147,11 +144,15 @@ import {
|
|
|
147
144
|
Skeleton as Skeleton2,
|
|
148
145
|
Text as Text4
|
|
149
146
|
} from "@0xsequence/design-system";
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
import { use$ } from "@legendapp/state/react";
|
|
148
|
+
import {
|
|
149
|
+
Close,
|
|
150
|
+
Content,
|
|
151
|
+
Overlay,
|
|
152
|
+
Portal,
|
|
153
|
+
Root,
|
|
154
|
+
Title
|
|
155
|
+
} from "@radix-ui/react-dialog";
|
|
155
156
|
|
|
156
157
|
// src/react/ui/modals/_internal/components/transaction-footer/index.tsx
|
|
157
158
|
import { networks } from "@0xsequence/network";
|
|
@@ -263,9 +264,7 @@ var initialState = {
|
|
|
263
264
|
collectibleId,
|
|
264
265
|
type,
|
|
265
266
|
callbacks,
|
|
266
|
-
queriesToInvalidate
|
|
267
|
-
confirmations,
|
|
268
|
-
blocked
|
|
267
|
+
queriesToInvalidate
|
|
269
268
|
}) => {
|
|
270
269
|
transactionStatusModal$.state.set({
|
|
271
270
|
...transactionStatusModal$.state.get(),
|
|
@@ -277,9 +276,7 @@ var initialState = {
|
|
|
277
276
|
collectibleId,
|
|
278
277
|
type,
|
|
279
278
|
callbacks,
|
|
280
|
-
queriesToInvalidate
|
|
281
|
-
confirmations,
|
|
282
|
-
blocked
|
|
279
|
+
queriesToInvalidate
|
|
283
280
|
});
|
|
284
281
|
transactionStatusModal$.isOpen.set(true);
|
|
285
282
|
},
|
|
@@ -299,9 +296,7 @@ var initialState = {
|
|
|
299
296
|
collectibleId: "",
|
|
300
297
|
type: void 0,
|
|
301
298
|
callbacks: void 0,
|
|
302
|
-
queriesToInvalidate: []
|
|
303
|
-
confirmations: -1,
|
|
304
|
-
blocked: false
|
|
299
|
+
queriesToInvalidate: []
|
|
305
300
|
}
|
|
306
301
|
};
|
|
307
302
|
var transactionStatusModal$ = observable(initialState);
|
|
@@ -574,24 +569,73 @@ function getTransactionStatusModalTitle({
|
|
|
574
569
|
}
|
|
575
570
|
}
|
|
576
571
|
|
|
572
|
+
// src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts
|
|
573
|
+
import { skipToken as skipToken2, useQuery as useQuery2 } from "@tanstack/react-query";
|
|
574
|
+
import { TransactionStatus as IndexerTransactionStatus } from "@0xsequence/indexer";
|
|
575
|
+
import { WaitForTransactionReceiptTimeoutError } from "viem";
|
|
576
|
+
import { useState as useState2, useEffect as useEffect2 } from "react";
|
|
577
|
+
var useTransactionStatus = (hash, chainId, callbacks) => {
|
|
578
|
+
const { wallet } = useWallet();
|
|
579
|
+
const [status, setStatus] = useState2(
|
|
580
|
+
hash ? "PENDING" : "SUCCESS"
|
|
581
|
+
);
|
|
582
|
+
const { data: confirmationResult } = useQuery2({
|
|
583
|
+
queryKey: ["transaction-confirmation", hash, chainId, !!wallet],
|
|
584
|
+
queryFn: !!wallet && hash ? async () => await wallet.handleConfirmTransactionStep(hash, Number(chainId)) : skipToken2
|
|
585
|
+
});
|
|
586
|
+
useEffect2(() => {
|
|
587
|
+
if (!hash) {
|
|
588
|
+
setStatus("SUCCESS");
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
if (!confirmationResult) {
|
|
592
|
+
setStatus("PENDING");
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
try {
|
|
596
|
+
if (confirmationResult.txnStatus === IndexerTransactionStatus.SUCCESSFUL) {
|
|
597
|
+
setStatus("SUCCESS");
|
|
598
|
+
callbacks?.onSuccess?.({ hash: hash || "0x0" });
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
setStatus("FAILED");
|
|
602
|
+
callbacks?.onError?.(new Error("Transaction failed"));
|
|
603
|
+
} catch (error) {
|
|
604
|
+
setStatus(
|
|
605
|
+
error instanceof WaitForTransactionReceiptTimeoutError ? "TIMEOUT" : "FAILED"
|
|
606
|
+
);
|
|
607
|
+
callbacks?.onError?.(error);
|
|
608
|
+
}
|
|
609
|
+
}, [confirmationResult, hash]);
|
|
610
|
+
return status;
|
|
611
|
+
};
|
|
612
|
+
var useTransactionStatus_default = useTransactionStatus;
|
|
613
|
+
|
|
577
614
|
// src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx
|
|
578
615
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
616
|
+
var invalidateQueries = async (queriesToInvalidate) => {
|
|
617
|
+
const queryClient = getQueryClient();
|
|
618
|
+
if (!queriesToInvalidate) {
|
|
619
|
+
queryClient.invalidateQueries();
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
for (const queryKey of queriesToInvalidate) {
|
|
623
|
+
await queryClient.invalidateQueries({ queryKey });
|
|
624
|
+
}
|
|
625
|
+
};
|
|
579
626
|
var useTransactionStatusModal = () => {
|
|
580
627
|
return {
|
|
581
628
|
show: (args) => {
|
|
582
|
-
if (args.blocked) return;
|
|
583
629
|
transactionStatusModal$.open(args);
|
|
584
630
|
},
|
|
585
631
|
close: () => transactionStatusModal$.close()
|
|
586
632
|
};
|
|
587
633
|
};
|
|
588
|
-
var
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
await queryClient.invalidateQueries({ queryKey });
|
|
592
|
-
}
|
|
634
|
+
var TransactionStatusModal = () => {
|
|
635
|
+
const isOpen = use$(transactionStatusModal$.isOpen);
|
|
636
|
+
return isOpen ? /* @__PURE__ */ jsx4(Modal, {}) : null;
|
|
593
637
|
};
|
|
594
|
-
|
|
638
|
+
function Modal() {
|
|
595
639
|
const {
|
|
596
640
|
type,
|
|
597
641
|
hash,
|
|
@@ -601,64 +645,14 @@ var TransactionStatusModal = observer2(() => {
|
|
|
601
645
|
chainId,
|
|
602
646
|
collectibleId,
|
|
603
647
|
callbacks,
|
|
604
|
-
queriesToInvalidate
|
|
605
|
-
|
|
606
|
-
} = transactionStatusModal$.state.get();
|
|
648
|
+
queriesToInvalidate
|
|
649
|
+
} = use$(transactionStatusModal$.state);
|
|
607
650
|
const { data: collectible, isLoading: collectibleLoading } = useCollectible({
|
|
608
651
|
collectionAddress,
|
|
609
652
|
chainId,
|
|
610
653
|
collectibleId
|
|
611
654
|
});
|
|
612
|
-
const
|
|
613
|
-
orderId ? "SUCCESS" : "PENDING"
|
|
614
|
-
);
|
|
615
|
-
const queryClient = getQueryClient();
|
|
616
|
-
const publicClient = chainId ? getPublicRpcClient(chainId) : null;
|
|
617
|
-
const waitForTransactionReceiptPromise = publicClient?.waitForTransactionReceipt({
|
|
618
|
-
confirmations: confirmations || TRANSACTION_CONFIRMATIONS_DEFAULT,
|
|
619
|
-
hash: hash || "0x"
|
|
620
|
-
});
|
|
621
|
-
useEffect2(() => {
|
|
622
|
-
if (!transactionStatusModal$.isOpen.get() || orderId) return;
|
|
623
|
-
console.log("Waiting for transaction receipt ...");
|
|
624
|
-
waitForTransactionReceiptPromise?.then((receipt) => {
|
|
625
|
-
if (receipt.status === "success") {
|
|
626
|
-
console.log("receipt", receipt);
|
|
627
|
-
setTransactionStatus("SUCCESS");
|
|
628
|
-
if (callbacks?.onSuccess) {
|
|
629
|
-
callbacks.onSuccess({ hash: hash || "0x0" });
|
|
630
|
-
} else {
|
|
631
|
-
console.debug("onSuccess callback not provided:", hash);
|
|
632
|
-
}
|
|
633
|
-
if (queriesToInvalidate) {
|
|
634
|
-
invalidateQueries(queriesToInvalidate);
|
|
635
|
-
} else {
|
|
636
|
-
queryClient.invalidateQueries();
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
}).catch((error) => {
|
|
640
|
-
if (callbacks?.onError) {
|
|
641
|
-
callbacks.onError(error);
|
|
642
|
-
} else {
|
|
643
|
-
console.debug("onError callback not provided:", error);
|
|
644
|
-
}
|
|
645
|
-
if (error instanceof WaitForTransactionReceiptTimeoutError) {
|
|
646
|
-
setTransactionStatus("TIMEOUT");
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
setTransactionStatus("FAILED");
|
|
650
|
-
});
|
|
651
|
-
return () => {
|
|
652
|
-
setTransactionStatus("PENDING");
|
|
653
|
-
};
|
|
654
|
-
}, [
|
|
655
|
-
callbacks?.onSuccess,
|
|
656
|
-
callbacks?.onError,
|
|
657
|
-
transactionStatusModal$.isOpen.get()
|
|
658
|
-
]);
|
|
659
|
-
if (!type) {
|
|
660
|
-
return null;
|
|
661
|
-
}
|
|
655
|
+
const transactionStatus = useTransactionStatus_default(hash, chainId, callbacks);
|
|
662
656
|
const title = getTransactionStatusModalTitle({
|
|
663
657
|
transactionStatus,
|
|
664
658
|
transactionType: type,
|
|
@@ -671,7 +665,7 @@ var TransactionStatusModal = observer2(() => {
|
|
|
671
665
|
orderId,
|
|
672
666
|
price
|
|
673
667
|
});
|
|
674
|
-
return /* @__PURE__ */ jsx4(Root, { open:
|
|
668
|
+
return /* @__PURE__ */ jsx4(Root, { open: true, children: /* @__PURE__ */ jsxs3(Portal, { container: getProviderEl(), children: [
|
|
675
669
|
/* @__PURE__ */ jsx4(Overlay, { className: dialogOverlay3 }),
|
|
676
670
|
/* @__PURE__ */ jsxs3(
|
|
677
671
|
Content,
|
|
@@ -679,7 +673,7 @@ var TransactionStatusModal = observer2(() => {
|
|
|
679
673
|
className: transactionStatusModalContent,
|
|
680
674
|
"data-testid": "transaction-status-modal",
|
|
681
675
|
children: [
|
|
682
|
-
title ? /* @__PURE__ */ jsx4(
|
|
676
|
+
/* @__PURE__ */ jsx4(Title, { asChild: true, children: title ? /* @__PURE__ */ jsx4(
|
|
683
677
|
Text4,
|
|
684
678
|
{
|
|
685
679
|
fontSize: "large",
|
|
@@ -696,7 +690,7 @@ var TransactionStatusModal = observer2(() => {
|
|
|
696
690
|
height: "6",
|
|
697
691
|
"data-testid": "transaction-modal-title-skeleton"
|
|
698
692
|
}
|
|
699
|
-
),
|
|
693
|
+
) }),
|
|
700
694
|
message ? /* @__PURE__ */ jsx4(
|
|
701
695
|
Text4,
|
|
702
696
|
{
|
|
@@ -746,6 +740,7 @@ var TransactionStatusModal = observer2(() => {
|
|
|
746
740
|
Close,
|
|
747
741
|
{
|
|
748
742
|
onClick: () => {
|
|
743
|
+
invalidateQueries(queriesToInvalidate);
|
|
749
744
|
transactionStatusModal$.close();
|
|
750
745
|
},
|
|
751
746
|
className: closeButton3,
|
|
@@ -757,7 +752,7 @@ var TransactionStatusModal = observer2(() => {
|
|
|
757
752
|
}
|
|
758
753
|
)
|
|
759
754
|
] }) });
|
|
760
|
-
}
|
|
755
|
+
}
|
|
761
756
|
var transactionStatusModal_default = TransactionStatusModal;
|
|
762
757
|
|
|
763
758
|
// src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx
|
|
@@ -1031,7 +1026,7 @@ var LoadingModal = ({
|
|
|
1031
1026
|
|
|
1032
1027
|
// src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx
|
|
1033
1028
|
import { Box as Box6, Skeleton as Skeleton3, Text as Text5 } from "@0xsequence/design-system";
|
|
1034
|
-
import { observer as
|
|
1029
|
+
import { observer as observer2 } from "@legendapp/state/react";
|
|
1035
1030
|
import { addDays } from "date-fns";
|
|
1036
1031
|
|
|
1037
1032
|
// src/react/ui/modals/_internal/components/calendarPopover/index.tsx
|
|
@@ -1155,7 +1150,7 @@ var PRESET_RANGES = {
|
|
|
1155
1150
|
offset: 30
|
|
1156
1151
|
}
|
|
1157
1152
|
};
|
|
1158
|
-
var ExpirationDateSelect =
|
|
1153
|
+
var ExpirationDateSelect = observer2(function ExpirationDateSelect2({
|
|
1159
1154
|
className,
|
|
1160
1155
|
$date
|
|
1161
1156
|
}) {
|
|
@@ -1333,10 +1328,10 @@ var currencyImage_default = CurrencyImage;
|
|
|
1333
1328
|
|
|
1334
1329
|
// src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx
|
|
1335
1330
|
import { Skeleton as Skeleton4 } from "@0xsequence/design-system";
|
|
1336
|
-
import { observer as
|
|
1331
|
+
import { observer as observer3 } from "@legendapp/state/react";
|
|
1337
1332
|
import { useEffect as useEffect4 } from "react";
|
|
1338
1333
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1339
|
-
var CurrencyOptionsSelect =
|
|
1334
|
+
var CurrencyOptionsSelect = observer3(function CurrencyOptionsSelect2({
|
|
1340
1335
|
chainId,
|
|
1341
1336
|
collectionAddress,
|
|
1342
1337
|
secondCurrencyAsDefault,
|
|
@@ -1390,7 +1385,7 @@ var CurrencyOptionsSelect = observer4(function CurrencyOptionsSelect2({
|
|
|
1390
1385
|
var currencyOptionsSelect_default = CurrencyOptionsSelect;
|
|
1391
1386
|
|
|
1392
1387
|
// src/react/ui/modals/_internal/components/priceInput/index.tsx
|
|
1393
|
-
import { use$ } from "@legendapp/state/react";
|
|
1388
|
+
import { use$ as use$2 } from "@legendapp/state/react";
|
|
1394
1389
|
import { useState as useState5 } from "react";
|
|
1395
1390
|
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1396
1391
|
function PriceInput({
|
|
@@ -1403,9 +1398,9 @@ function PriceInput({
|
|
|
1403
1398
|
includeNativeCurrency
|
|
1404
1399
|
}) {
|
|
1405
1400
|
const { address: accountAddress } = useAccount();
|
|
1406
|
-
const currencyDecimals = use$($price.currency.decimals);
|
|
1407
|
-
const currencyAddress = use$($price.currency.contractAddress);
|
|
1408
|
-
const priceAmountRaw = use$($price.amountRaw);
|
|
1401
|
+
const currencyDecimals = use$2($price.currency.decimals);
|
|
1402
|
+
const currencyAddress = use$2($price.currency.contractAddress);
|
|
1403
|
+
const priceAmountRaw = use$2($price.amountRaw);
|
|
1409
1404
|
const { data: balance, isSuccess: isBalanceSuccess } = useCurrencyBalance({
|
|
1410
1405
|
currencyAddress,
|
|
1411
1406
|
chainId: Number(chainId),
|
|
@@ -1712,9 +1707,9 @@ var makeOfferModal$ = observable2({
|
|
|
1712
1707
|
// src/react/ui/modals/MakeOfferModal/Modal.tsx
|
|
1713
1708
|
import { Fragment, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1714
1709
|
var MakeOfferModal = () => {
|
|
1715
|
-
return /* @__PURE__ */ jsx16(Show, { if: makeOfferModal$.isOpen, children: () => /* @__PURE__ */ jsx16(
|
|
1710
|
+
return /* @__PURE__ */ jsx16(Show, { if: makeOfferModal$.isOpen, children: () => /* @__PURE__ */ jsx16(Modal2, {}) });
|
|
1716
1711
|
};
|
|
1717
|
-
var
|
|
1712
|
+
var Modal2 = observer4(() => {
|
|
1718
1713
|
const state = makeOfferModal$.get();
|
|
1719
1714
|
const {
|
|
1720
1715
|
collectionAddress,
|
|
@@ -1883,7 +1878,7 @@ var Modal = observer5(() => {
|
|
|
1883
1878
|
});
|
|
1884
1879
|
|
|
1885
1880
|
// src/react/ui/modals/SellModal/Modal.tsx
|
|
1886
|
-
import { Show as Show2, observer as
|
|
1881
|
+
import { Show as Show2, observer as observer5 } from "@legendapp/state/react";
|
|
1887
1882
|
import { parseUnits as parseUnits3 } from "viem";
|
|
1888
1883
|
|
|
1889
1884
|
// src/react/ui/modals/_internal/components/transactionDetails/index.tsx
|
|
@@ -2014,7 +2009,7 @@ var initialState3 = {
|
|
|
2014
2009
|
var sellModal$ = observable3(initialState3);
|
|
2015
2010
|
|
|
2016
2011
|
// src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx
|
|
2017
|
-
import { useQuery as
|
|
2012
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
2018
2013
|
|
|
2019
2014
|
// src/react/ui/modals/BuyModal/hooks/useFees.ts
|
|
2020
2015
|
import { avalanche, optimism } from "viem/chains";
|
|
@@ -2049,7 +2044,7 @@ var useGetTokenApprovalData2 = (params) => {
|
|
|
2049
2044
|
chainId: Number(params.chainId),
|
|
2050
2045
|
collectionAddress: params.collectionAddress
|
|
2051
2046
|
});
|
|
2052
|
-
const { data, isLoading, isSuccess } =
|
|
2047
|
+
const { data, isLoading, isSuccess } = useQuery3({
|
|
2053
2048
|
queryKey: ["token-approval-data", params.ordersData],
|
|
2054
2049
|
queryFn: async () => {
|
|
2055
2050
|
const address = await wallet.address();
|
|
@@ -2282,9 +2277,9 @@ var useSell = ({
|
|
|
2282
2277
|
// src/react/ui/modals/SellModal/Modal.tsx
|
|
2283
2278
|
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2284
2279
|
var SellModal = () => {
|
|
2285
|
-
return /* @__PURE__ */ jsx19(Show2, { if: sellModal$.isOpen, children: () => /* @__PURE__ */ jsx19(
|
|
2280
|
+
return /* @__PURE__ */ jsx19(Show2, { if: sellModal$.isOpen, children: () => /* @__PURE__ */ jsx19(Modal3, {}) });
|
|
2286
2281
|
};
|
|
2287
|
-
var
|
|
2282
|
+
var Modal3 = observer5(() => {
|
|
2288
2283
|
const { tokenId, collectionAddress, chainId, order, callbacks } = sellModal$.get();
|
|
2289
2284
|
const steps$ = sellModal$.steps;
|
|
2290
2285
|
const { data: collectible } = useCollection({
|
|
@@ -2417,7 +2412,7 @@ import {
|
|
|
2417
2412
|
Image as Image5,
|
|
2418
2413
|
Text as Text11
|
|
2419
2414
|
} from "@0xsequence/design-system";
|
|
2420
|
-
import { observer as
|
|
2415
|
+
import { observer as observer6 } from "@legendapp/state/react";
|
|
2421
2416
|
import { Close as Close2, Content as Content3, Overlay as Overlay2, Portal as Portal3, Root as Root3 } from "@radix-ui/react-dialog";
|
|
2422
2417
|
|
|
2423
2418
|
// src/react/ui/modals/SuccessfulPurchaseModal/_store.ts
|
|
@@ -2470,7 +2465,7 @@ var useSuccessfulPurchaseModal = (callbacks) => {
|
|
|
2470
2465
|
close: () => successfulPurchaseModal$.close()
|
|
2471
2466
|
};
|
|
2472
2467
|
};
|
|
2473
|
-
var SuccessfulPurchaseModal =
|
|
2468
|
+
var SuccessfulPurchaseModal = observer6(() => {
|
|
2474
2469
|
return /* @__PURE__ */ jsx20(Root3, { open: successfulPurchaseModal$.isOpen.get(), children: /* @__PURE__ */ jsxs13(Portal3, { children: [
|
|
2475
2470
|
/* @__PURE__ */ jsx20(Overlay2, { className: dialogOverlay }),
|
|
2476
2471
|
/* @__PURE__ */ jsxs13(Content3, { className: dialogContent.narrow, children: [
|
|
@@ -2604,7 +2599,7 @@ var SuccessfulPurchaseModal_default = SuccessfulPurchaseModal;
|
|
|
2604
2599
|
|
|
2605
2600
|
// src/react/ui/modals/TransferModal/index.tsx
|
|
2606
2601
|
import { CloseIcon as CloseIcon3, IconButton as IconButton4 } from "@0xsequence/design-system";
|
|
2607
|
-
import { Show as Show3, observer as
|
|
2602
|
+
import { Show as Show3, observer as observer8 } from "@legendapp/state/react";
|
|
2608
2603
|
import { Close as Close3, Content as Content4, Overlay as Overlay3, Portal as Portal4, Root as Root4 } from "@radix-ui/react-dialog";
|
|
2609
2604
|
import { useAccount as useAccount3 } from "wagmi";
|
|
2610
2605
|
|
|
@@ -2816,9 +2811,9 @@ var enterWalletAddress_default = EnterWalletAddressView;
|
|
|
2816
2811
|
|
|
2817
2812
|
// src/react/ui/modals/TransferModal/_views/followWalletInstructions/index.tsx
|
|
2818
2813
|
import { Box as Box15, Button as Button4, Text as Text13 } from "@0xsequence/design-system";
|
|
2819
|
-
import { observer as
|
|
2814
|
+
import { observer as observer7 } from "@legendapp/state/react";
|
|
2820
2815
|
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2821
|
-
var FollowWalletInstructionsView =
|
|
2816
|
+
var FollowWalletInstructionsView = observer7(() => {
|
|
2822
2817
|
return /* @__PURE__ */ jsxs15(Box15, { display: "grid", gap: "6", flexGrow: "1", children: [
|
|
2823
2818
|
/* @__PURE__ */ jsx22(Text13, { color: "white", fontSize: "large", fontWeight: "bold", fontFamily: "body", children: "Transfer your item" }),
|
|
2824
2819
|
/* @__PURE__ */ jsx22(Box15, { display: "flex", flexDirection: "column", gap: "3", children: /* @__PURE__ */ jsx22(
|
|
@@ -2882,12 +2877,12 @@ var useTransferModal = () => {
|
|
|
2882
2877
|
};
|
|
2883
2878
|
};
|
|
2884
2879
|
var TransferModal = () => {
|
|
2885
|
-
return /* @__PURE__ */ jsx23(Show3, { if: transferModal$.isOpen, children: /* @__PURE__ */ jsx23(
|
|
2880
|
+
return /* @__PURE__ */ jsx23(Show3, { if: transferModal$.isOpen, children: /* @__PURE__ */ jsx23(Modal4, {}) });
|
|
2886
2881
|
};
|
|
2887
|
-
var
|
|
2882
|
+
var Modal4 = () => {
|
|
2888
2883
|
return /* @__PURE__ */ jsx23(ModalContent, {});
|
|
2889
2884
|
};
|
|
2890
|
-
var ModalContent =
|
|
2885
|
+
var ModalContent = observer8(() => {
|
|
2891
2886
|
return /* @__PURE__ */ jsx23(Root4, { open: true, children: /* @__PURE__ */ jsxs16(Portal4, { children: [
|
|
2892
2887
|
/* @__PURE__ */ jsx23(Overlay3, { className: dialogOverlay2 }),
|
|
2893
2888
|
/* @__PURE__ */ jsxs16(Content4, { className: transferModalContent, children: [
|
|
@@ -2896,7 +2891,7 @@ var ModalContent = observer9(() => {
|
|
|
2896
2891
|
] })
|
|
2897
2892
|
] }) });
|
|
2898
2893
|
});
|
|
2899
|
-
var TransactionModalView =
|
|
2894
|
+
var TransactionModalView = observer8(() => {
|
|
2900
2895
|
const { view } = transferModal$.get();
|
|
2901
2896
|
switch (view) {
|
|
2902
2897
|
case "enterReceiverAddress":
|
|
@@ -2910,7 +2905,7 @@ var TransactionModalView = observer9(() => {
|
|
|
2910
2905
|
|
|
2911
2906
|
// src/react/ui/modals/CreateListingModal/Modal.tsx
|
|
2912
2907
|
import { Box as Box16 } from "@0xsequence/design-system";
|
|
2913
|
-
import { Show as Show4, observer as
|
|
2908
|
+
import { Show as Show4, observer as observer9 } from "@legendapp/state/react";
|
|
2914
2909
|
import { parseUnits as parseUnits4 } from "viem";
|
|
2915
2910
|
import { useAccount as useAccount4 } from "wagmi";
|
|
2916
2911
|
|
|
@@ -2975,7 +2970,7 @@ var createListingModal$ = observable7({
|
|
|
2975
2970
|
import { useEffect as useEffect6 } from "react";
|
|
2976
2971
|
|
|
2977
2972
|
// src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts
|
|
2978
|
-
import { skipToken as
|
|
2973
|
+
import { skipToken as skipToken3, useQuery as useQuery4 } from "@tanstack/react-query";
|
|
2979
2974
|
var ONE_DAY_IN_SECONDS2 = 60 * 60 * 24;
|
|
2980
2975
|
var useGetTokenApprovalData3 = (params) => {
|
|
2981
2976
|
const config = useConfig();
|
|
@@ -2989,7 +2984,7 @@ var useGetTokenApprovalData3 = (params) => {
|
|
|
2989
2984
|
expiry: String(Number(dateToUnixTime(/* @__PURE__ */ new Date())) + ONE_DAY_IN_SECONDS2)
|
|
2990
2985
|
};
|
|
2991
2986
|
const isEnabled = wallet && params.query?.enabled !== false;
|
|
2992
|
-
const { data, isLoading, isSuccess } =
|
|
2987
|
+
const { data, isLoading, isSuccess } = useQuery4({
|
|
2993
2988
|
queryKey: ["token-approval-data", params.currencyAddress],
|
|
2994
2989
|
queryFn: isEnabled ? async () => {
|
|
2995
2990
|
const args = {
|
|
@@ -3012,7 +3007,7 @@ var useGetTokenApprovalData3 = (params) => {
|
|
|
3012
3007
|
return {
|
|
3013
3008
|
step: tokenApprovalStep
|
|
3014
3009
|
};
|
|
3015
|
-
} :
|
|
3010
|
+
} : skipToken3
|
|
3016
3011
|
});
|
|
3017
3012
|
return {
|
|
3018
3013
|
data,
|
|
@@ -3224,9 +3219,9 @@ var useCreateListing = ({
|
|
|
3224
3219
|
// src/react/ui/modals/CreateListingModal/Modal.tsx
|
|
3225
3220
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3226
3221
|
var CreateListingModal = () => {
|
|
3227
|
-
return /* @__PURE__ */ jsx24(Show4, { if: createListingModal$.isOpen, children: () => /* @__PURE__ */ jsx24(
|
|
3222
|
+
return /* @__PURE__ */ jsx24(Show4, { if: createListingModal$.isOpen, children: () => /* @__PURE__ */ jsx24(Modal5, {}) });
|
|
3228
3223
|
};
|
|
3229
|
-
var
|
|
3224
|
+
var Modal5 = observer9(() => {
|
|
3230
3225
|
const state = createListingModal$.get();
|
|
3231
3226
|
const {
|
|
3232
3227
|
collectionAddress,
|
|
@@ -3246,6 +3241,16 @@ var Modal4 = observer10(() => {
|
|
|
3246
3241
|
collectionAddress,
|
|
3247
3242
|
collectibleId
|
|
3248
3243
|
});
|
|
3244
|
+
const currencyOptions = useCurrencyOptions({ collectionAddress });
|
|
3245
|
+
const {
|
|
3246
|
+
data: currencies,
|
|
3247
|
+
isLoading: currenciesLoading,
|
|
3248
|
+
isError: currenciesIsError
|
|
3249
|
+
} = useCurrencies({
|
|
3250
|
+
chainId,
|
|
3251
|
+
currencyOptions,
|
|
3252
|
+
includeNativeCurrency: true
|
|
3253
|
+
});
|
|
3249
3254
|
const {
|
|
3250
3255
|
data: collection,
|
|
3251
3256
|
isLoading: collectionIsLoading,
|
|
@@ -3282,7 +3287,7 @@ var Modal4 = observer10(() => {
|
|
|
3282
3287
|
closeMainModal: () => createListingModal$.close(),
|
|
3283
3288
|
steps$
|
|
3284
3289
|
});
|
|
3285
|
-
if (collectableIsLoading || collectionIsLoading) {
|
|
3290
|
+
if (collectableIsLoading || collectionIsLoading || currenciesLoading) {
|
|
3286
3291
|
return /* @__PURE__ */ jsx24(
|
|
3287
3292
|
LoadingModal,
|
|
3288
3293
|
{
|
|
@@ -3293,7 +3298,7 @@ var Modal4 = observer10(() => {
|
|
|
3293
3298
|
}
|
|
3294
3299
|
);
|
|
3295
3300
|
}
|
|
3296
|
-
if (collectableIsError || collectionIsError) {
|
|
3301
|
+
if (collectableIsError || collectionIsError || currenciesIsError) {
|
|
3297
3302
|
return /* @__PURE__ */ jsx24(
|
|
3298
3303
|
ErrorModal,
|
|
3299
3304
|
{
|
|
@@ -3304,6 +3309,18 @@ var Modal4 = observer10(() => {
|
|
|
3304
3309
|
}
|
|
3305
3310
|
);
|
|
3306
3311
|
}
|
|
3312
|
+
if (!currencies || currencies.length === 0) {
|
|
3313
|
+
return /* @__PURE__ */ jsx24(
|
|
3314
|
+
ErrorModal,
|
|
3315
|
+
{
|
|
3316
|
+
isOpen: createListingModal$.isOpen.get(),
|
|
3317
|
+
chainId: Number(chainId),
|
|
3318
|
+
onClose: createListingModal$.close,
|
|
3319
|
+
title: "List item for sale",
|
|
3320
|
+
message: "No currencies are configured for the marketplace, contact the marketplace owners"
|
|
3321
|
+
}
|
|
3322
|
+
);
|
|
3323
|
+
}
|
|
3307
3324
|
const ctas = [
|
|
3308
3325
|
{
|
|
3309
3326
|
label: "Approve TOKEN",
|
|
@@ -3384,10 +3401,17 @@ var Modal4 = observer10(() => {
|
|
|
3384
3401
|
});
|
|
3385
3402
|
|
|
3386
3403
|
// src/react/ui/modals/BuyModal/Modal.tsx
|
|
3387
|
-
import { use$ as use$
|
|
3404
|
+
import { use$ as use$3 } from "@legendapp/state/react";
|
|
3388
3405
|
|
|
3389
3406
|
// src/react/ui/modals/BuyModal/store.ts
|
|
3390
3407
|
import { observable as observable8 } from "@legendapp/state";
|
|
3408
|
+
var buyState = {
|
|
3409
|
+
order: void 0,
|
|
3410
|
+
quantity: "1",
|
|
3411
|
+
invalidQuantity: false,
|
|
3412
|
+
checkoutModalIsLoading: false,
|
|
3413
|
+
checkoutModalLoaded: false
|
|
3414
|
+
};
|
|
3391
3415
|
var initialState7 = {
|
|
3392
3416
|
isOpen: false,
|
|
3393
3417
|
open: ({
|
|
@@ -3398,7 +3422,6 @@ var initialState7 = {
|
|
|
3398
3422
|
buyModal$.state.set({
|
|
3399
3423
|
quantity: args.order.quantityAvailableFormatted,
|
|
3400
3424
|
order: args.order,
|
|
3401
|
-
modalId: buyModal$.state.modalId.get() + 1,
|
|
3402
3425
|
invalidQuantity: false,
|
|
3403
3426
|
checkoutModalIsLoading: false,
|
|
3404
3427
|
checkoutModalLoaded: false
|
|
@@ -3408,15 +3431,10 @@ var initialState7 = {
|
|
|
3408
3431
|
},
|
|
3409
3432
|
close: () => {
|
|
3410
3433
|
buyModal$.isOpen.set(false);
|
|
3434
|
+
buyModal$.callbacks.set(void 0);
|
|
3435
|
+
buyModal$.state.set(buyState);
|
|
3411
3436
|
},
|
|
3412
|
-
state:
|
|
3413
|
-
order: void 0,
|
|
3414
|
-
quantity: "1",
|
|
3415
|
-
modalId: 0,
|
|
3416
|
-
invalidQuantity: false,
|
|
3417
|
-
checkoutModalIsLoading: false,
|
|
3418
|
-
checkoutModalLoaded: false
|
|
3419
|
-
},
|
|
3437
|
+
state: buyState,
|
|
3420
3438
|
setCheckoutModalIsLoading: (isLoading) => {
|
|
3421
3439
|
buyModal$.state.checkoutModalIsLoading.set(isLoading);
|
|
3422
3440
|
},
|
|
@@ -3449,25 +3467,19 @@ function CheckoutModal({ buy, collectable, order }) {
|
|
|
3449
3467
|
|
|
3450
3468
|
// src/react/ui/modals/BuyModal/modals/Modal1155.tsx
|
|
3451
3469
|
import { Box as Box17, Text as Text14, TokenImage as TokenImage2 } from "@0xsequence/design-system";
|
|
3452
|
-
import { observer as
|
|
3470
|
+
import { observer as observer10 } from "@legendapp/state/react";
|
|
3453
3471
|
import { formatUnits as formatUnits4, parseUnits as parseUnits6 } from "viem";
|
|
3454
|
-
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3455
|
-
var ERC1155QuantityModal =
|
|
3472
|
+
import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3473
|
+
var ERC1155QuantityModal = observer10(
|
|
3456
3474
|
({ buy, collectable, order }) => {
|
|
3457
|
-
const
|
|
3458
|
-
collectionAddress: order.collectionContractAddress
|
|
3459
|
-
});
|
|
3460
|
-
const { data: currencies } = useCurrencies({
|
|
3475
|
+
const { data: currency, isLoading: isCurrencyLoading } = useCurrency({
|
|
3461
3476
|
chainId: order.chainId,
|
|
3462
|
-
|
|
3477
|
+
currencyAddress: order.priceCurrencyAddress
|
|
3463
3478
|
});
|
|
3464
|
-
const currency = currencies?.find(
|
|
3465
|
-
(currency2) => currency2.contractAddress === order.priceCurrencyAddress
|
|
3466
|
-
);
|
|
3467
3479
|
const quantity = Number(buyModal$.state.quantity.get());
|
|
3468
3480
|
const pricePerToken = order.priceAmount;
|
|
3469
3481
|
const totalPrice = (BigInt(quantity) * BigInt(pricePerToken)).toString();
|
|
3470
|
-
if (buyModal$.state.checkoutModalLoaded.get()) {
|
|
3482
|
+
if (buyModal$.state.checkoutModalLoaded.get() && buyModal$.isOpen.get() && buyModal$.state.checkoutModalIsLoading.get()) {
|
|
3471
3483
|
return null;
|
|
3472
3484
|
}
|
|
3473
3485
|
return /* @__PURE__ */ jsx25(
|
|
@@ -3507,11 +3519,21 @@ var ERC1155QuantityModal = observer11(
|
|
|
3507
3519
|
}
|
|
3508
3520
|
),
|
|
3509
3521
|
/* @__PURE__ */ jsxs18(Box17, { display: "flex", justifyContent: "space-between", children: [
|
|
3510
|
-
/* @__PURE__ */ jsx25(Text14, { color: "text50", fontSize: "small", children: "Total Price" }),
|
|
3511
|
-
/* @__PURE__ */
|
|
3512
|
-
/* @__PURE__ */ jsx25(TokenImage2, { src: currency
|
|
3513
|
-
/* @__PURE__ */ jsx25(
|
|
3514
|
-
|
|
3522
|
+
/* @__PURE__ */ jsx25(Text14, { color: "text50", fontSize: "small", fontFamily: "body", children: "Total Price" }),
|
|
3523
|
+
/* @__PURE__ */ jsx25(Box17, { display: "flex", alignItems: "center", gap: "2", children: isCurrencyLoading || !currency ? /* @__PURE__ */ jsx25(Box17, { display: "flex", alignItems: "center", gap: "2", children: /* @__PURE__ */ jsx25(Text14, { color: "text50", fontSize: "small", fontFamily: "body", children: "Loading..." }) }) : /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3524
|
+
currency.imageUrl && /* @__PURE__ */ jsx25(TokenImage2, { src: currency.imageUrl, size: "xs" }),
|
|
3525
|
+
/* @__PURE__ */ jsx25(
|
|
3526
|
+
Text14,
|
|
3527
|
+
{
|
|
3528
|
+
color: "text100",
|
|
3529
|
+
fontSize: "small",
|
|
3530
|
+
fontWeight: "bold",
|
|
3531
|
+
fontFamily: "body",
|
|
3532
|
+
children: formatUnits4(BigInt(totalPrice), currency.decimals || 0)
|
|
3533
|
+
}
|
|
3534
|
+
),
|
|
3535
|
+
/* @__PURE__ */ jsx25(Text14, { color: "text80", fontSize: "small", fontFamily: "body", children: currency?.symbol })
|
|
3536
|
+
] }) })
|
|
3515
3537
|
] })
|
|
3516
3538
|
] })
|
|
3517
3539
|
}
|
|
@@ -3520,7 +3542,7 @@ var ERC1155QuantityModal = observer11(
|
|
|
3520
3542
|
);
|
|
3521
3543
|
|
|
3522
3544
|
// src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts
|
|
3523
|
-
import { useQuery as
|
|
3545
|
+
import { skipToken as skipToken4, useQuery as useQuery5 } from "@tanstack/react-query";
|
|
3524
3546
|
var useCheckoutOptions = (input) => {
|
|
3525
3547
|
const config = useConfig();
|
|
3526
3548
|
const { wallet } = useWallet();
|
|
@@ -3528,7 +3550,7 @@ var useCheckoutOptions = (input) => {
|
|
|
3528
3550
|
chainId: input.chainId,
|
|
3529
3551
|
collectionAddress: input.collectionAddress
|
|
3530
3552
|
});
|
|
3531
|
-
return
|
|
3553
|
+
return useQuery5({
|
|
3532
3554
|
queryKey: [
|
|
3533
3555
|
"checkoutOptions",
|
|
3534
3556
|
input.chainId,
|
|
@@ -3536,7 +3558,7 @@ var useCheckoutOptions = (input) => {
|
|
|
3536
3558
|
input.orderId,
|
|
3537
3559
|
input.marketplace
|
|
3538
3560
|
],
|
|
3539
|
-
queryFn: async () => {
|
|
3561
|
+
queryFn: wallet ? async () => {
|
|
3540
3562
|
const marketplaceClient = getMarketplaceClient(input.chainId, config);
|
|
3541
3563
|
return marketplaceClient.checkoutOptionsMarketplace({
|
|
3542
3564
|
wallet: await wallet.address(),
|
|
@@ -3549,7 +3571,7 @@ var useCheckoutOptions = (input) => {
|
|
|
3549
3571
|
],
|
|
3550
3572
|
additionalFee: Number(fees.amount)
|
|
3551
3573
|
}).then((res) => res.options);
|
|
3552
|
-
},
|
|
3574
|
+
} : skipToken4,
|
|
3553
3575
|
enabled: !!wallet
|
|
3554
3576
|
});
|
|
3555
3577
|
};
|
|
@@ -3688,23 +3710,22 @@ var useBuyCollectable = ({
|
|
|
3688
3710
|
// src/react/ui/modals/BuyModal/Modal.tsx
|
|
3689
3711
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3690
3712
|
var BuyModal = () => {
|
|
3691
|
-
const isOpen = use$
|
|
3713
|
+
const isOpen = use$3(buyModal$.isOpen);
|
|
3692
3714
|
if (!isOpen) return null;
|
|
3693
3715
|
return /* @__PURE__ */ jsx26(BuyModalContent, {});
|
|
3694
3716
|
};
|
|
3695
3717
|
var BuyModalContent = () => {
|
|
3696
|
-
const chainId = String(use$
|
|
3697
|
-
const collectionAddress = use$
|
|
3718
|
+
const chainId = String(use$3(buyModal$.state.order.chainId));
|
|
3719
|
+
const collectionAddress = use$3(
|
|
3698
3720
|
buyModal$.state.order.collectionContractAddress
|
|
3699
3721
|
);
|
|
3700
|
-
const collectibleId = use$
|
|
3701
|
-
const
|
|
3702
|
-
const
|
|
3703
|
-
const
|
|
3704
|
-
const
|
|
3705
|
-
const
|
|
3706
|
-
const
|
|
3707
|
-
const setCheckoutModalLoaded = use$2(buyModal$.setCheckoutModalLoaded);
|
|
3722
|
+
const collectibleId = use$3(buyModal$.state.order.tokenId);
|
|
3723
|
+
const callbacks = use$3(buyModal$.callbacks);
|
|
3724
|
+
const order = use$3(buyModal$.state.order);
|
|
3725
|
+
const isOpen = use$3(buyModal$.isOpen);
|
|
3726
|
+
const checkoutModalIsLoading = use$3(buyModal$.state.checkoutModalIsLoading);
|
|
3727
|
+
const setCheckoutModalIsLoading = use$3(buyModal$.setCheckoutModalIsLoading);
|
|
3728
|
+
const setCheckoutModalLoaded = use$3(buyModal$.setCheckoutModalLoaded);
|
|
3708
3729
|
const { collection, collectable, checkoutOptions, isLoading, isError } = useLoadData({
|
|
3709
3730
|
chainId: Number(chainId),
|
|
3710
3731
|
collectionAddress,
|
|
@@ -3760,8 +3781,7 @@ var BuyModalContent = () => {
|
|
|
3760
3781
|
buy: buyAction,
|
|
3761
3782
|
collectable,
|
|
3762
3783
|
order
|
|
3763
|
-
}
|
|
3764
|
-
modalId
|
|
3784
|
+
}
|
|
3765
3785
|
) : /* @__PURE__ */ jsx26(
|
|
3766
3786
|
ERC1155QuantityModal,
|
|
3767
3787
|
{
|
|
@@ -3776,9 +3796,9 @@ var BuyModalContent = () => {
|
|
|
3776
3796
|
};
|
|
3777
3797
|
|
|
3778
3798
|
// src/react/ui/modals/modal-provider.tsx
|
|
3779
|
-
import { Fragment as
|
|
3780
|
-
var ModalProvider =
|
|
3781
|
-
return /* @__PURE__ */ jsxs19(
|
|
3799
|
+
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3800
|
+
var ModalProvider = observer11(() => {
|
|
3801
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
3782
3802
|
/* @__PURE__ */ jsx27(CreateListingModal, {}),
|
|
3783
3803
|
/* @__PURE__ */ jsx27(MakeOfferModal, {}),
|
|
3784
3804
|
/* @__PURE__ */ jsx27(TransferModal, {}),
|
|
@@ -3822,8 +3842,7 @@ var useBuyModal = (callbacks) => {
|
|
|
3822
3842
|
|
|
3823
3843
|
// src/react/ui/components/collectible-card/CollectibleCard.tsx
|
|
3824
3844
|
import { useState as useState7 } from "react";
|
|
3825
|
-
import { Box as
|
|
3826
|
-
import { useAccount as useAccount6 } from "wagmi";
|
|
3845
|
+
import { Box as Box22, IconButton as IconButton6, Skeleton as Skeleton8 } from "@0xsequence/design-system";
|
|
3827
3846
|
|
|
3828
3847
|
// src/react/ui/icons/DiamondEye.tsx
|
|
3829
3848
|
import { Box as Box18 } from "@0xsequence/design-system";
|
|
@@ -3865,127 +3884,361 @@ var SvgDiamondEyeIcon = ({ size = "sm", ...props }) => /* @__PURE__ */ jsx28(
|
|
|
3865
3884
|
var DiamondEye_default = SvgDiamondEyeIcon;
|
|
3866
3885
|
|
|
3867
3886
|
// src/react/ui/components/_internals/action-button/ActionButton.tsx
|
|
3887
|
+
import { observer as observer12 } from "@legendapp/state/react";
|
|
3888
|
+
|
|
3889
|
+
// src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts
|
|
3890
|
+
import { useEffect as useEffect8 } from "react";
|
|
3891
|
+
import { useAccount as useAccount5 } from "wagmi";
|
|
3892
|
+
|
|
3893
|
+
// src/react/ui/components/_internals/action-button/store.ts
|
|
3894
|
+
import { observable as observable9 } from "@legendapp/state";
|
|
3895
|
+
var actionButtonStore = observable9({
|
|
3896
|
+
pendingAction: null
|
|
3897
|
+
});
|
|
3898
|
+
var setPendingAction = (type, callback, collectibleId) => {
|
|
3899
|
+
actionButtonStore.pendingAction.set({
|
|
3900
|
+
type,
|
|
3901
|
+
callback,
|
|
3902
|
+
timestamp: Date.now(),
|
|
3903
|
+
collectibleId
|
|
3904
|
+
});
|
|
3905
|
+
};
|
|
3906
|
+
var clearPendingAction = () => {
|
|
3907
|
+
actionButtonStore.pendingAction.set(null);
|
|
3908
|
+
};
|
|
3909
|
+
var executePendingActionIfExists = () => {
|
|
3910
|
+
const timestamp = actionButtonStore.pendingAction.get()?.timestamp;
|
|
3911
|
+
const callback = actionButtonStore.pendingAction.get()?.callback;
|
|
3912
|
+
if (timestamp && callback) {
|
|
3913
|
+
if (Date.now() - timestamp < 5 * 60 * 1e3 && typeof callback === "function") {
|
|
3914
|
+
callback();
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
};
|
|
3918
|
+
|
|
3919
|
+
// src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts
|
|
3920
|
+
var useActionButtonLogic = ({
|
|
3921
|
+
tokenId,
|
|
3922
|
+
owned,
|
|
3923
|
+
action,
|
|
3924
|
+
onCannotPerformAction
|
|
3925
|
+
}) => {
|
|
3926
|
+
const { address } = useAccount5();
|
|
3927
|
+
const actionsThatOwnersCannotPerform = [
|
|
3928
|
+
"Buy" /* BUY */,
|
|
3929
|
+
"Make an offer" /* OFFER */
|
|
3930
|
+
];
|
|
3931
|
+
const pendingActionType = actionButtonStore.pendingAction.type.get();
|
|
3932
|
+
useEffect8(() => {
|
|
3933
|
+
if (owned && actionButtonStore.pendingAction.get() && address && !actionsThatOwnersCannotPerform.includes(action) && actionButtonStore.pendingAction.get()?.collectibleId === tokenId) {
|
|
3934
|
+
onCannotPerformAction?.(
|
|
3935
|
+
pendingActionType
|
|
3936
|
+
);
|
|
3937
|
+
clearPendingAction();
|
|
3938
|
+
}
|
|
3939
|
+
}, [
|
|
3940
|
+
owned,
|
|
3941
|
+
actionButtonStore.pendingAction.get(),
|
|
3942
|
+
address,
|
|
3943
|
+
action,
|
|
3944
|
+
tokenId,
|
|
3945
|
+
onCannotPerformAction,
|
|
3946
|
+
pendingActionType
|
|
3947
|
+
]);
|
|
3948
|
+
useEffect8(() => {
|
|
3949
|
+
if (address && !owned && actionButtonStore.pendingAction.get() && actionButtonStore.pendingAction.get()?.collectibleId === tokenId) {
|
|
3950
|
+
setTimeout(() => {
|
|
3951
|
+
executePendingActionIfExists();
|
|
3952
|
+
clearPendingAction();
|
|
3953
|
+
}, 1e3);
|
|
3954
|
+
}
|
|
3955
|
+
}, [address, owned, tokenId]);
|
|
3956
|
+
const shouldShowAction = !address ? ["Buy" /* BUY */, "Make an offer" /* OFFER */].includes(action) : true;
|
|
3957
|
+
const isOwnerAction = address && owned && [
|
|
3958
|
+
"Create listing" /* LIST */,
|
|
3959
|
+
"Transfer" /* TRANSFER */,
|
|
3960
|
+
"Sell" /* SELL */
|
|
3961
|
+
].includes(action);
|
|
3962
|
+
return {
|
|
3963
|
+
address,
|
|
3964
|
+
shouldShowAction,
|
|
3965
|
+
isOwnerAction
|
|
3966
|
+
};
|
|
3967
|
+
};
|
|
3968
|
+
|
|
3969
|
+
// src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx
|
|
3868
3970
|
import { Button as Button5 } from "@0xsequence/design-system";
|
|
3869
|
-
import {
|
|
3971
|
+
import { useAccount as useAccount6 } from "wagmi";
|
|
3972
|
+
import { useOpenConnectModal } from "@0xsequence/kit";
|
|
3973
|
+
|
|
3974
|
+
// src/react/ui/components/_internals/action-button/styles.css.ts
|
|
3975
|
+
var actionButton = "styles_actionButton__m8ll4q0";
|
|
3976
|
+
|
|
3977
|
+
// src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx
|
|
3870
3978
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3979
|
+
function ActionButtonBody({
|
|
3980
|
+
tokenId,
|
|
3981
|
+
label,
|
|
3982
|
+
onClick,
|
|
3983
|
+
icon,
|
|
3984
|
+
action
|
|
3985
|
+
}) {
|
|
3986
|
+
const { address } = useAccount6();
|
|
3987
|
+
const { setOpenConnectModal } = useOpenConnectModal();
|
|
3988
|
+
const handleClick = (e) => {
|
|
3989
|
+
e.preventDefault();
|
|
3990
|
+
e.stopPropagation();
|
|
3991
|
+
if (!address && action) {
|
|
3992
|
+
setPendingAction(action, onClick, tokenId);
|
|
3993
|
+
setOpenConnectModal(true);
|
|
3994
|
+
} else {
|
|
3995
|
+
onClick();
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
return /* @__PURE__ */ jsx29(
|
|
3999
|
+
Button5,
|
|
4000
|
+
{
|
|
4001
|
+
className: actionButton,
|
|
4002
|
+
variant: "primary",
|
|
4003
|
+
label,
|
|
4004
|
+
onClick: handleClick,
|
|
4005
|
+
leftIcon: icon,
|
|
4006
|
+
size: "xs",
|
|
4007
|
+
shape: "square",
|
|
4008
|
+
width: "full"
|
|
4009
|
+
}
|
|
4010
|
+
);
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
// src/react/ui/components/_internals/action-button/components/OwnerActions.tsx
|
|
4014
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4015
|
+
function OwnerActions({
|
|
4016
|
+
action,
|
|
4017
|
+
tokenId,
|
|
4018
|
+
collectionAddress,
|
|
4019
|
+
chainId,
|
|
4020
|
+
orderbookKind,
|
|
4021
|
+
highestOffer
|
|
4022
|
+
}) {
|
|
4023
|
+
const { show: showCreateListingModal } = useCreateListingModal();
|
|
4024
|
+
const { show: showSellModal } = useSellModal();
|
|
4025
|
+
const { show: showTransferModal } = useTransferModal();
|
|
4026
|
+
if (action === "Create listing" /* LIST */) {
|
|
4027
|
+
return /* @__PURE__ */ jsx30(
|
|
4028
|
+
ActionButtonBody,
|
|
4029
|
+
{
|
|
4030
|
+
label: "Create listing",
|
|
4031
|
+
tokenId,
|
|
4032
|
+
onClick: () => showCreateListingModal({
|
|
4033
|
+
collectionAddress,
|
|
4034
|
+
chainId,
|
|
4035
|
+
collectibleId: tokenId,
|
|
4036
|
+
orderbookKind
|
|
4037
|
+
})
|
|
4038
|
+
}
|
|
4039
|
+
);
|
|
4040
|
+
}
|
|
4041
|
+
if (action === "Sell" /* SELL */ && highestOffer) {
|
|
4042
|
+
return /* @__PURE__ */ jsx30(
|
|
4043
|
+
ActionButtonBody,
|
|
4044
|
+
{
|
|
4045
|
+
tokenId,
|
|
4046
|
+
label: "Sell",
|
|
4047
|
+
onClick: () => showSellModal({
|
|
4048
|
+
collectionAddress,
|
|
4049
|
+
chainId,
|
|
4050
|
+
tokenId,
|
|
4051
|
+
order: highestOffer
|
|
4052
|
+
})
|
|
4053
|
+
}
|
|
4054
|
+
);
|
|
4055
|
+
}
|
|
4056
|
+
if (action === "Transfer" /* TRANSFER */) {
|
|
4057
|
+
return /* @__PURE__ */ jsx30(
|
|
4058
|
+
ActionButtonBody,
|
|
4059
|
+
{
|
|
4060
|
+
label: "Transfer",
|
|
4061
|
+
tokenId,
|
|
4062
|
+
onClick: () => showTransferModal({
|
|
4063
|
+
collectionAddress,
|
|
4064
|
+
chainId,
|
|
4065
|
+
collectibleId: tokenId
|
|
4066
|
+
})
|
|
4067
|
+
}
|
|
4068
|
+
);
|
|
4069
|
+
}
|
|
4070
|
+
return null;
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
// src/react/ui/icons/CartIcon.tsx
|
|
4074
|
+
import { Box as Box19 } from "@0xsequence/design-system";
|
|
4075
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4076
|
+
var Svg2 = () => /* @__PURE__ */ jsxs21(
|
|
4077
|
+
"svg",
|
|
4078
|
+
{
|
|
4079
|
+
width: "20",
|
|
4080
|
+
height: "20",
|
|
4081
|
+
viewBox: "0 0 20 20",
|
|
4082
|
+
fill: "none",
|
|
4083
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4084
|
+
role: "img",
|
|
4085
|
+
"aria-labelledby": "cart-title",
|
|
4086
|
+
children: [
|
|
4087
|
+
/* @__PURE__ */ jsx31("title", { id: "cart-title", children: "Cart Icon" }),
|
|
4088
|
+
/* @__PURE__ */ jsx31(
|
|
4089
|
+
"path",
|
|
3891
4090
|
{
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
tokenId,
|
|
3897
|
-
order: lowestListing
|
|
3898
|
-
})
|
|
4091
|
+
"fill-rule": "evenodd",
|
|
4092
|
+
"clip-rule": "evenodd",
|
|
4093
|
+
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",
|
|
4094
|
+
fill: "white"
|
|
3899
4095
|
}
|
|
3900
|
-
)
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
if (!highestOffer)
|
|
3904
|
-
throw new InvalidStepError("SELL", "highestOffer is required");
|
|
3905
|
-
return /* @__PURE__ */ jsx29(
|
|
3906
|
-
ActionButtonBody,
|
|
4096
|
+
),
|
|
4097
|
+
/* @__PURE__ */ jsx31(
|
|
4098
|
+
"path",
|
|
3907
4099
|
{
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
collectionAddress,
|
|
3911
|
-
chainId,
|
|
3912
|
-
tokenId,
|
|
3913
|
-
order: highestOffer
|
|
3914
|
-
})
|
|
4100
|
+
d: "M18.0003 5.34182H6.40946L7.49564 10.8234H17.0736C17.3133 10.8234 17.5193 10.6637 17.5643 10.443L18.491 5.89813C18.5498 5.60942 18.3138 5.34182 18.0003 5.34182Z",
|
|
4101
|
+
fill: "white"
|
|
3915
4102
|
}
|
|
3916
|
-
)
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
return /* @__PURE__ */ jsx29(
|
|
3920
|
-
ActionButtonBody,
|
|
4103
|
+
),
|
|
4104
|
+
/* @__PURE__ */ jsx31(
|
|
4105
|
+
"path",
|
|
3921
4106
|
{
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
collectionAddress,
|
|
3925
|
-
chainId,
|
|
3926
|
-
collectibleId: tokenId,
|
|
3927
|
-
orderbookKind
|
|
3928
|
-
})
|
|
4107
|
+
d: "M10.0889 15.8559C10.0889 16.4878 9.54259 17 8.86866 17C8.19473 17 7.64841 16.4878 7.64841 15.8559C7.64841 15.2241 8.19473 14.7119 8.86866 14.7119C9.54259 14.7119 10.0889 15.2241 10.0889 15.8559Z",
|
|
4108
|
+
fill: "white"
|
|
3929
4109
|
}
|
|
3930
|
-
)
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
return /* @__PURE__ */ jsx29(
|
|
3934
|
-
ActionButtonBody,
|
|
4110
|
+
),
|
|
4111
|
+
/* @__PURE__ */ jsx31(
|
|
4112
|
+
"path",
|
|
3935
4113
|
{
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
collectionAddress,
|
|
3939
|
-
chainId,
|
|
3940
|
-
collectibleId: tokenId,
|
|
3941
|
-
orderbookKind
|
|
3942
|
-
})
|
|
4114
|
+
d: "M16.6268 15.8559C16.6268 16.4878 16.0804 17 15.4065 17C14.7326 17 14.1863 16.4878 14.1863 15.8559C14.1863 15.2241 14.7326 14.7119 15.4065 14.7119C16.0804 14.7119 16.6268 15.2241 16.6268 15.8559Z",
|
|
4115
|
+
fill: "white"
|
|
3943
4116
|
}
|
|
3944
|
-
)
|
|
4117
|
+
)
|
|
4118
|
+
]
|
|
4119
|
+
}
|
|
4120
|
+
);
|
|
4121
|
+
var SvgCartIcon = ({ size = "sm", ...props }) => /* @__PURE__ */ jsx31(
|
|
4122
|
+
Box19,
|
|
4123
|
+
{
|
|
4124
|
+
as: Svg2,
|
|
4125
|
+
className: iconVariants({
|
|
4126
|
+
size
|
|
4127
|
+
}),
|
|
4128
|
+
...props
|
|
4129
|
+
}
|
|
4130
|
+
);
|
|
4131
|
+
var CartIcon_default = SvgCartIcon;
|
|
4132
|
+
|
|
4133
|
+
// src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx
|
|
4134
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4135
|
+
function NonOwnerActions({
|
|
4136
|
+
action,
|
|
4137
|
+
tokenId,
|
|
4138
|
+
collectionAddress,
|
|
4139
|
+
chainId,
|
|
4140
|
+
orderbookKind,
|
|
4141
|
+
lowestListing
|
|
4142
|
+
}) {
|
|
4143
|
+
const { show: showBuyModal } = useBuyModal();
|
|
4144
|
+
const { show: showMakeOfferModal } = useMakeOfferModal();
|
|
4145
|
+
if (action === "Buy" /* BUY */) {
|
|
4146
|
+
if (!lowestListing) {
|
|
4147
|
+
throw new InvalidStepError("BUY", "lowestListing is required");
|
|
4148
|
+
}
|
|
4149
|
+
return /* @__PURE__ */ jsx32(
|
|
4150
|
+
ActionButtonBody,
|
|
4151
|
+
{
|
|
4152
|
+
action: "Buy" /* BUY */,
|
|
4153
|
+
tokenId,
|
|
4154
|
+
label: "Buy now",
|
|
4155
|
+
onClick: () => showBuyModal({
|
|
4156
|
+
collectionAddress,
|
|
4157
|
+
chainId,
|
|
4158
|
+
tokenId,
|
|
4159
|
+
order: lowestListing
|
|
4160
|
+
}),
|
|
4161
|
+
icon: CartIcon_default
|
|
4162
|
+
}
|
|
4163
|
+
);
|
|
4164
|
+
}
|
|
4165
|
+
if (action === "Make an offer" /* OFFER */) {
|
|
4166
|
+
return /* @__PURE__ */ jsx32(
|
|
4167
|
+
ActionButtonBody,
|
|
4168
|
+
{
|
|
4169
|
+
action: "Make an offer" /* OFFER */,
|
|
4170
|
+
tokenId,
|
|
4171
|
+
label: "Make an offer",
|
|
4172
|
+
onClick: () => showMakeOfferModal({
|
|
4173
|
+
collectionAddress,
|
|
4174
|
+
chainId,
|
|
4175
|
+
collectibleId: tokenId,
|
|
4176
|
+
orderbookKind
|
|
4177
|
+
})
|
|
4178
|
+
}
|
|
4179
|
+
);
|
|
4180
|
+
}
|
|
4181
|
+
return null;
|
|
4182
|
+
}
|
|
4183
|
+
|
|
4184
|
+
// src/react/ui/components/_internals/action-button/ActionButton.tsx
|
|
4185
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4186
|
+
var ActionButton = observer12(
|
|
4187
|
+
({
|
|
4188
|
+
collectionAddress,
|
|
4189
|
+
chainId,
|
|
4190
|
+
tokenId,
|
|
4191
|
+
orderbookKind,
|
|
4192
|
+
action,
|
|
4193
|
+
owned,
|
|
4194
|
+
highestOffer,
|
|
4195
|
+
lowestListing,
|
|
4196
|
+
onCannotPerformAction
|
|
4197
|
+
}) => {
|
|
4198
|
+
const { shouldShowAction, isOwnerAction } = useActionButtonLogic({
|
|
4199
|
+
tokenId,
|
|
4200
|
+
owned,
|
|
4201
|
+
action,
|
|
4202
|
+
onCannotPerformAction
|
|
4203
|
+
});
|
|
4204
|
+
if (!shouldShowAction) {
|
|
4205
|
+
return null;
|
|
3945
4206
|
}
|
|
3946
|
-
if (
|
|
3947
|
-
return /* @__PURE__ */
|
|
3948
|
-
|
|
4207
|
+
if (isOwnerAction) {
|
|
4208
|
+
return /* @__PURE__ */ jsx33(
|
|
4209
|
+
OwnerActions,
|
|
3949
4210
|
{
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
4211
|
+
action,
|
|
4212
|
+
tokenId,
|
|
4213
|
+
collectionAddress,
|
|
4214
|
+
chainId,
|
|
4215
|
+
orderbookKind,
|
|
4216
|
+
highestOffer
|
|
3956
4217
|
}
|
|
3957
4218
|
);
|
|
3958
4219
|
}
|
|
3959
|
-
return
|
|
4220
|
+
return /* @__PURE__ */ jsx33(
|
|
4221
|
+
NonOwnerActions,
|
|
4222
|
+
{
|
|
4223
|
+
action,
|
|
4224
|
+
tokenId,
|
|
4225
|
+
collectionAddress,
|
|
4226
|
+
chainId,
|
|
4227
|
+
orderbookKind,
|
|
4228
|
+
lowestListing
|
|
4229
|
+
}
|
|
4230
|
+
);
|
|
3960
4231
|
}
|
|
3961
4232
|
);
|
|
3962
|
-
function ActionButtonBody({ label, onClick }) {
|
|
3963
|
-
return /* @__PURE__ */ jsx29(
|
|
3964
|
-
Button5,
|
|
3965
|
-
{
|
|
3966
|
-
variant: "primary",
|
|
3967
|
-
label,
|
|
3968
|
-
onClick: (e) => {
|
|
3969
|
-
e.preventDefault();
|
|
3970
|
-
e.stopPropagation();
|
|
3971
|
-
onClick();
|
|
3972
|
-
},
|
|
3973
|
-
size: "xs",
|
|
3974
|
-
shape: "square",
|
|
3975
|
-
width: "full"
|
|
3976
|
-
}
|
|
3977
|
-
);
|
|
3978
|
-
}
|
|
3979
4233
|
|
|
3980
4234
|
// src/react/ui/components/collectible-card/Footer.tsx
|
|
3981
|
-
import { Box as
|
|
4235
|
+
import { Box as Box21, IconButton as IconButton5, Image as Image6, Text as Text15 } from "@0xsequence/design-system";
|
|
3982
4236
|
import { formatUnits as formatUnits5 } from "viem";
|
|
3983
|
-
import { useAccount as useAccount5 } from "wagmi";
|
|
3984
4237
|
|
|
3985
4238
|
// src/react/ui/icons/Bell.tsx
|
|
3986
|
-
import { Box as
|
|
3987
|
-
import { jsx as
|
|
3988
|
-
var
|
|
4239
|
+
import { Box as Box20 } from "@0xsequence/design-system";
|
|
4240
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4241
|
+
var Svg3 = () => /* @__PURE__ */ jsxs22(
|
|
3989
4242
|
"svg",
|
|
3990
4243
|
{
|
|
3991
4244
|
width: "17",
|
|
@@ -3996,8 +4249,8 @@ var Svg2 = () => /* @__PURE__ */ jsxs21(
|
|
|
3996
4249
|
role: "img",
|
|
3997
4250
|
"aria-labelledby": "bell-title",
|
|
3998
4251
|
children: [
|
|
3999
|
-
/* @__PURE__ */
|
|
4000
|
-
/* @__PURE__ */
|
|
4252
|
+
/* @__PURE__ */ jsx34("title", { id: "bell-title", children: "Notification Bell" }),
|
|
4253
|
+
/* @__PURE__ */ jsx34(
|
|
4001
4254
|
"path",
|
|
4002
4255
|
{
|
|
4003
4256
|
fillRule: "evenodd",
|
|
@@ -4009,10 +4262,10 @@ var Svg2 = () => /* @__PURE__ */ jsxs21(
|
|
|
4009
4262
|
]
|
|
4010
4263
|
}
|
|
4011
4264
|
);
|
|
4012
|
-
var SvgBellIcon = ({ size = "sm", ...props }) => /* @__PURE__ */
|
|
4013
|
-
|
|
4265
|
+
var SvgBellIcon = ({ size = "sm", ...props }) => /* @__PURE__ */ jsx34(
|
|
4266
|
+
Box20,
|
|
4014
4267
|
{
|
|
4015
|
-
as:
|
|
4268
|
+
as: Svg3,
|
|
4016
4269
|
className: iconVariants({
|
|
4017
4270
|
size
|
|
4018
4271
|
}),
|
|
@@ -4022,7 +4275,7 @@ var SvgBellIcon = ({ size = "sm", ...props }) => /* @__PURE__ */ jsx30(
|
|
|
4022
4275
|
var Bell_default = SvgBellIcon;
|
|
4023
4276
|
|
|
4024
4277
|
// src/react/ui/components/collectible-card/Footer.tsx
|
|
4025
|
-
import { jsx as
|
|
4278
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4026
4279
|
var Footer = ({
|
|
4027
4280
|
name,
|
|
4028
4281
|
type,
|
|
@@ -4030,10 +4283,8 @@ var Footer = ({
|
|
|
4030
4283
|
highestOffer,
|
|
4031
4284
|
lowestListingPriceAmount,
|
|
4032
4285
|
lowestListingCurrency,
|
|
4033
|
-
balance
|
|
4034
|
-
isAnimated
|
|
4286
|
+
balance
|
|
4035
4287
|
}) => {
|
|
4036
|
-
const { address } = useAccount5();
|
|
4037
4288
|
const listed = !!lowestListingPriceAmount && !!lowestListingCurrency;
|
|
4038
4289
|
if (name.length > 15 && highestOffer) {
|
|
4039
4290
|
name = `${name.substring(0, 13)}...`;
|
|
@@ -4041,8 +4292,8 @@ var Footer = ({
|
|
|
4041
4292
|
if (name.length > 17 && !highestOffer) {
|
|
4042
4293
|
name = `${name.substring(0, 17)}...`;
|
|
4043
4294
|
}
|
|
4044
|
-
return /* @__PURE__ */
|
|
4045
|
-
|
|
4295
|
+
return /* @__PURE__ */ jsxs23(
|
|
4296
|
+
Box21,
|
|
4046
4297
|
{
|
|
4047
4298
|
display: "flex",
|
|
4048
4299
|
flexDirection: "column",
|
|
@@ -4051,10 +4302,10 @@ var Footer = ({
|
|
|
4051
4302
|
padding: "4",
|
|
4052
4303
|
whiteSpace: "nowrap",
|
|
4053
4304
|
position: "relative",
|
|
4054
|
-
className:
|
|
4305
|
+
className: footer,
|
|
4055
4306
|
children: [
|
|
4056
|
-
/* @__PURE__ */
|
|
4057
|
-
|
|
4307
|
+
/* @__PURE__ */ jsxs23(
|
|
4308
|
+
Box21,
|
|
4058
4309
|
{
|
|
4059
4310
|
display: "flex",
|
|
4060
4311
|
alignItems: "center",
|
|
@@ -4062,7 +4313,7 @@ var Footer = ({
|
|
|
4062
4313
|
position: "relative",
|
|
4063
4314
|
width: "full",
|
|
4064
4315
|
children: [
|
|
4065
|
-
/* @__PURE__ */
|
|
4316
|
+
/* @__PURE__ */ jsx35(
|
|
4066
4317
|
Text15,
|
|
4067
4318
|
{
|
|
4068
4319
|
color: "text100",
|
|
@@ -4070,10 +4321,11 @@ var Footer = ({
|
|
|
4070
4321
|
fontWeight: "bold",
|
|
4071
4322
|
textAlign: "left",
|
|
4072
4323
|
fontFamily: "body",
|
|
4073
|
-
|
|
4324
|
+
visibility: name ? "visible" : "hidden",
|
|
4325
|
+
children: name || "Untitled"
|
|
4074
4326
|
}
|
|
4075
4327
|
),
|
|
4076
|
-
highestOffer && onOfferClick && /* @__PURE__ */
|
|
4328
|
+
highestOffer && onOfferClick && /* @__PURE__ */ jsx35(
|
|
4077
4329
|
IconButton5,
|
|
4078
4330
|
{
|
|
4079
4331
|
size: "xs",
|
|
@@ -4086,15 +4338,15 @@ var Footer = ({
|
|
|
4086
4338
|
e.stopPropagation();
|
|
4087
4339
|
onOfferClick?.();
|
|
4088
4340
|
},
|
|
4089
|
-
icon: (props) => /* @__PURE__ */
|
|
4341
|
+
icon: (props) => /* @__PURE__ */ jsx35(Bell_default, { ...props, size: "xs" })
|
|
4090
4342
|
}
|
|
4091
4343
|
)
|
|
4092
4344
|
]
|
|
4093
4345
|
}
|
|
4094
4346
|
),
|
|
4095
|
-
/* @__PURE__ */
|
|
4096
|
-
listed && /* @__PURE__ */
|
|
4097
|
-
/* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ jsxs23(Box21, { display: "flex", alignItems: "center", gap: "1", children: [
|
|
4348
|
+
listed && lowestListingCurrency.imageUrl && /* @__PURE__ */ jsx35(Image6, { src: lowestListingCurrency.imageUrl, width: "3", height: "3" }),
|
|
4349
|
+
/* @__PURE__ */ jsxs23(
|
|
4098
4350
|
Text15,
|
|
4099
4351
|
{
|
|
4100
4352
|
color: listed ? "text100" : "text50",
|
|
@@ -4112,7 +4364,7 @@ var Footer = ({
|
|
|
4112
4364
|
}
|
|
4113
4365
|
)
|
|
4114
4366
|
] }),
|
|
4115
|
-
/* @__PURE__ */
|
|
4367
|
+
/* @__PURE__ */ jsx35(TokenTypeBalancePill, { balance, type })
|
|
4116
4368
|
]
|
|
4117
4369
|
}
|
|
4118
4370
|
);
|
|
@@ -4122,7 +4374,7 @@ var TokenTypeBalancePill = ({
|
|
|
4122
4374
|
type
|
|
4123
4375
|
}) => {
|
|
4124
4376
|
const displayText = type === "ERC1155" /* ERC1155 */ ? balance ? `Owned: ${balance}` : "ERC-1155" : "ERC-721";
|
|
4125
|
-
return /* @__PURE__ */
|
|
4377
|
+
return /* @__PURE__ */ jsx35(
|
|
4126
4378
|
Text15,
|
|
4127
4379
|
{
|
|
4128
4380
|
background: "backgroundSecondary",
|
|
@@ -4139,25 +4391,25 @@ var TokenTypeBalancePill = ({
|
|
|
4139
4391
|
};
|
|
4140
4392
|
|
|
4141
4393
|
// src/react/ui/components/collectible-card/CollectibleCard.tsx
|
|
4142
|
-
import { jsx as
|
|
4394
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4143
4395
|
function CollectibleSkeleton() {
|
|
4144
|
-
return /* @__PURE__ */
|
|
4145
|
-
|
|
4396
|
+
return /* @__PURE__ */ jsxs24(
|
|
4397
|
+
Box22,
|
|
4146
4398
|
{
|
|
4147
4399
|
className: collectibleCard,
|
|
4148
4400
|
borderRadius: "md",
|
|
4149
4401
|
overflow: "hidden",
|
|
4150
4402
|
background: "backgroundPrimary",
|
|
4151
4403
|
children: [
|
|
4152
|
-
/* @__PURE__ */
|
|
4404
|
+
/* @__PURE__ */ jsx36(
|
|
4153
4405
|
Skeleton8,
|
|
4154
4406
|
{
|
|
4155
4407
|
size: "lg",
|
|
4156
4408
|
style: { width: "100%", height: 164, borderRadius: 0, paddingTop: 16 }
|
|
4157
4409
|
}
|
|
4158
4410
|
),
|
|
4159
|
-
/* @__PURE__ */
|
|
4160
|
-
|
|
4411
|
+
/* @__PURE__ */ jsxs24(
|
|
4412
|
+
Box22,
|
|
4161
4413
|
{
|
|
4162
4414
|
display: "flex",
|
|
4163
4415
|
flexDirection: "column",
|
|
@@ -4166,8 +4418,8 @@ function CollectibleSkeleton() {
|
|
|
4166
4418
|
paddingBottom: "4",
|
|
4167
4419
|
marginTop: "2",
|
|
4168
4420
|
children: [
|
|
4169
|
-
/* @__PURE__ */
|
|
4170
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ jsx36(Skeleton8, { size: "lg" }),
|
|
4422
|
+
/* @__PURE__ */ jsx36(Skeleton8, { size: "sm" })
|
|
4171
4423
|
]
|
|
4172
4424
|
}
|
|
4173
4425
|
)
|
|
@@ -4185,9 +4437,9 @@ function CollectibleCard({
|
|
|
4185
4437
|
onCollectibleClick,
|
|
4186
4438
|
onOfferClick,
|
|
4187
4439
|
balance,
|
|
4188
|
-
cardLoading
|
|
4440
|
+
cardLoading,
|
|
4441
|
+
onCannotPerformAction
|
|
4189
4442
|
}) {
|
|
4190
|
-
const { address: accountAddress } = useAccount6();
|
|
4191
4443
|
const collectibleMetadata = lowestListing?.metadata;
|
|
4192
4444
|
const [imageLoadingError, setImageLoadingError] = useState7(false);
|
|
4193
4445
|
const { data: highestOffer, isLoading: highestOfferLoading } = useHighestOffer({
|
|
@@ -4204,21 +4456,22 @@ function CollectibleCard({
|
|
|
4204
4456
|
}
|
|
4205
4457
|
});
|
|
4206
4458
|
if (highestOfferLoading || cardLoading) {
|
|
4207
|
-
return /* @__PURE__ */
|
|
4459
|
+
return /* @__PURE__ */ jsx36(CollectibleSkeleton, {});
|
|
4208
4460
|
}
|
|
4209
4461
|
const action = balance ? highestOffer?.order && "Sell" /* SELL */ || !lowestListing?.order && "Create listing" /* LIST */ || "Transfer" /* TRANSFER */ : lowestListing?.order && "Buy" /* BUY */ || "Make an offer" /* OFFER */;
|
|
4210
4462
|
const name = collectibleMetadata?.name;
|
|
4211
4463
|
const image = collectibleMetadata?.image;
|
|
4212
4464
|
const externalUrl = collectibleMetadata?.external_url;
|
|
4213
|
-
return /* @__PURE__ */
|
|
4214
|
-
|
|
4465
|
+
return /* @__PURE__ */ jsx36(
|
|
4466
|
+
Box22,
|
|
4215
4467
|
{
|
|
4216
4468
|
className: collectibleCard,
|
|
4217
4469
|
borderRadius: "md",
|
|
4218
4470
|
overflow: "hidden",
|
|
4219
4471
|
background: "backgroundPrimary",
|
|
4220
|
-
|
|
4221
|
-
|
|
4472
|
+
tabIndex: 0,
|
|
4473
|
+
children: /* @__PURE__ */ jsx36(
|
|
4474
|
+
Box22,
|
|
4222
4475
|
{
|
|
4223
4476
|
display: "flex",
|
|
4224
4477
|
flexDirection: "column",
|
|
@@ -4233,70 +4486,76 @@ function CollectibleCard({
|
|
|
4233
4486
|
cursor: "pointer",
|
|
4234
4487
|
padding: "0",
|
|
4235
4488
|
className: collectibleTileWrapper,
|
|
4236
|
-
children: /* @__PURE__ */
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
{
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
onError: () => setImageLoadingError(true)
|
|
4261
|
-
}
|
|
4262
|
-
),
|
|
4263
|
-
/* @__PURE__ */ jsx32(
|
|
4264
|
-
Footer,
|
|
4265
|
-
{
|
|
4266
|
-
name: name || "",
|
|
4267
|
-
type: collectionType,
|
|
4268
|
-
onOfferClick: () => onOfferClick?.({ order: highestOffer?.order }),
|
|
4269
|
-
highestOffer: highestOffer?.order,
|
|
4270
|
-
lowestListingPriceAmount: lowestListing?.order?.priceAmount,
|
|
4271
|
-
lowestListingCurrency,
|
|
4272
|
-
balance,
|
|
4273
|
-
isAnimated: !!action
|
|
4274
|
-
}
|
|
4275
|
-
),
|
|
4276
|
-
accountAddress && (highestOffer || lowestListing) && /* @__PURE__ */ jsx32(
|
|
4277
|
-
Box21,
|
|
4278
|
-
{
|
|
4279
|
-
display: "flex",
|
|
4280
|
-
alignItems: "center",
|
|
4281
|
-
justifyContent: "center",
|
|
4282
|
-
padding: "2",
|
|
4283
|
-
className: actionWrapper,
|
|
4284
|
-
children: /* @__PURE__ */ jsx32(
|
|
4285
|
-
ActionButton,
|
|
4489
|
+
children: /* @__PURE__ */ jsxs24(
|
|
4490
|
+
"article",
|
|
4491
|
+
{
|
|
4492
|
+
style: { width: "100%", display: "flex", flexDirection: "column" },
|
|
4493
|
+
children: [
|
|
4494
|
+
externalUrl && /* @__PURE__ */ jsx36(
|
|
4495
|
+
IconButton6,
|
|
4496
|
+
{
|
|
4497
|
+
as: "a",
|
|
4498
|
+
href: externalUrl,
|
|
4499
|
+
size: "sm",
|
|
4500
|
+
backdropFilter: "blur",
|
|
4501
|
+
variant: "glass",
|
|
4502
|
+
onClick: (e) => {
|
|
4503
|
+
e.stopPropagation();
|
|
4504
|
+
},
|
|
4505
|
+
position: "absolute",
|
|
4506
|
+
top: "2",
|
|
4507
|
+
left: "2",
|
|
4508
|
+
icon: DiamondEye_default
|
|
4509
|
+
}
|
|
4510
|
+
),
|
|
4511
|
+
/* @__PURE__ */ jsx36(
|
|
4512
|
+
"img",
|
|
4286
4513
|
{
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4514
|
+
src: imageLoadingError ? chess_tile_default : image || chess_tile_default,
|
|
4515
|
+
alt: name,
|
|
4516
|
+
className: collectibleImage,
|
|
4517
|
+
onError: () => setImageLoadingError(true)
|
|
4518
|
+
}
|
|
4519
|
+
),
|
|
4520
|
+
/* @__PURE__ */ jsx36(
|
|
4521
|
+
Footer,
|
|
4522
|
+
{
|
|
4523
|
+
name: name || "",
|
|
4524
|
+
type: collectionType,
|
|
4525
|
+
onOfferClick: () => onOfferClick?.({ order: highestOffer?.order }),
|
|
4292
4526
|
highestOffer: highestOffer?.order,
|
|
4293
|
-
|
|
4294
|
-
|
|
4527
|
+
lowestListingPriceAmount: lowestListing?.order?.priceAmount,
|
|
4528
|
+
lowestListingCurrency,
|
|
4529
|
+
balance
|
|
4530
|
+
}
|
|
4531
|
+
),
|
|
4532
|
+
(highestOffer || lowestListing) && /* @__PURE__ */ jsx36(
|
|
4533
|
+
Box22,
|
|
4534
|
+
{
|
|
4535
|
+
display: "flex",
|
|
4536
|
+
alignItems: "center",
|
|
4537
|
+
justifyContent: "center",
|
|
4538
|
+
padding: "2",
|
|
4539
|
+
className: actionWrapper,
|
|
4540
|
+
children: /* @__PURE__ */ jsx36(
|
|
4541
|
+
ActionButton,
|
|
4542
|
+
{
|
|
4543
|
+
chainId: String(chainId),
|
|
4544
|
+
collectionAddress,
|
|
4545
|
+
tokenId: collectibleId,
|
|
4546
|
+
orderbookKind,
|
|
4547
|
+
action,
|
|
4548
|
+
highestOffer: highestOffer?.order,
|
|
4549
|
+
lowestListing: lowestListing?.order,
|
|
4550
|
+
owned: !!balance,
|
|
4551
|
+
onCannotPerformAction
|
|
4552
|
+
}
|
|
4553
|
+
)
|
|
4295
4554
|
}
|
|
4296
4555
|
)
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4556
|
+
]
|
|
4557
|
+
}
|
|
4558
|
+
)
|
|
4300
4559
|
}
|
|
4301
4560
|
)
|
|
4302
4561
|
}
|
|
@@ -4313,4 +4572,4 @@ export {
|
|
|
4313
4572
|
useBuyModal,
|
|
4314
4573
|
CollectibleCard
|
|
4315
4574
|
};
|
|
4316
|
-
//# sourceMappingURL=chunk-
|
|
4575
|
+
//# sourceMappingURL=chunk-BJLOO4NP.js.map
|