@0xsequence/marketplace-sdk 0.4.2 → 0.4.4

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.
Files changed (115) hide show
  1. package/dist/{chunk-ZWIRTV7A.js → chunk-4VS5NKDD.js} +2 -2
  2. package/dist/{chunk-GSDUAHL3.js → chunk-6WB4GCCJ.js} +1 -1
  3. package/dist/chunk-6WB4GCCJ.js.map +1 -0
  4. package/dist/{chunk-MTFS5SED.js → chunk-6XUCLBZC.js} +3093 -2463
  5. package/dist/chunk-6XUCLBZC.js.map +1 -0
  6. package/dist/{chunk-T5T6JNB2.js → chunk-ATDCYXXV.js} +49 -49
  7. package/dist/chunk-ATDCYXXV.js.map +1 -0
  8. package/dist/{chunk-LSMQVX77.js → chunk-CP2IVRMX.js} +2 -2
  9. package/dist/{chunk-OPMDGQFB.js → chunk-DNDPYQKV.js} +20 -2
  10. package/dist/chunk-DNDPYQKV.js.map +1 -0
  11. package/dist/{chunk-WBJKZOQ7.js → chunk-GLOIEUWC.js} +225 -364
  12. package/dist/chunk-GLOIEUWC.js.map +1 -0
  13. package/dist/{chunk-4RKM3VUV.js → chunk-IQXJZBMR.js} +2 -2
  14. package/dist/{chunk-MQ5WSFDH.js → chunk-J4TRSLTB.js} +29 -4
  15. package/dist/chunk-J4TRSLTB.js.map +1 -0
  16. package/dist/chunk-LHN6EBLM.js +420 -0
  17. package/dist/chunk-LHN6EBLM.js.map +1 -0
  18. package/dist/{chunk-WQCWBXBM.js → chunk-PAZ4MQXZ.js} +1 -1
  19. package/dist/chunk-PAZ4MQXZ.js.map +1 -0
  20. package/dist/{chunk-S5IPE7TH.js → chunk-URX7ZHX4.js} +2 -2
  21. package/dist/chunk-Y75XGZOB.js +11 -0
  22. package/dist/chunk-Y75XGZOB.js.map +1 -0
  23. package/dist/{chunk-Q2BVDQ3G.js → chunk-ZEKRTFBU.js} +1 -1
  24. package/dist/{chunk-Q2BVDQ3G.js.map → chunk-ZEKRTFBU.js.map} +1 -1
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +10 -8
  27. package/dist/index.js.map +1 -1
  28. package/dist/react/_internal/api/index.js +2 -2
  29. package/dist/react/_internal/index.d.ts +1 -1
  30. package/dist/react/_internal/index.js +4 -4
  31. package/dist/react/_internal/wagmi/index.js +2 -2
  32. package/dist/react/hooks/index.d.ts +54 -42
  33. package/dist/react/hooks/index.js +8 -6
  34. package/dist/react/index.css +24 -24
  35. package/dist/react/index.css.map +1 -1
  36. package/dist/react/index.d.ts +2 -2
  37. package/dist/react/index.js +11 -9
  38. package/dist/react/ssr/index.js.map +1 -1
  39. package/dist/react/ui/components/index.css +24 -24
  40. package/dist/react/ui/components/index.css.map +1 -1
  41. package/dist/react/ui/components/index.d.ts +1 -1
  42. package/dist/react/ui/components/index.js +11 -9
  43. package/dist/react/ui/icons/index.js +1 -1
  44. package/dist/react/ui/index.css +24 -24
  45. package/dist/react/ui/index.css.map +1 -1
  46. package/dist/react/ui/index.d.ts +5 -2
  47. package/dist/react/ui/index.js +11 -9
  48. package/dist/react/ui/modals/_internal/components/actionModal/index.css +46 -0
  49. package/dist/react/ui/modals/_internal/components/actionModal/index.css.map +1 -1
  50. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +1 -1
  51. package/dist/react/ui/modals/_internal/components/actionModal/index.js +11 -6
  52. package/dist/types/index.js +4 -4
  53. package/dist/{types-BlDoGvJV.d.ts → types-DZb7GsfL.d.ts} +10 -1
  54. package/dist/utils/index.d.ts +1 -1
  55. package/dist/utils/index.js +2 -2
  56. package/package.json +1 -1
  57. package/src/consts.ts +3 -0
  58. package/src/react/_internal/transaction-machine/useTransactionMachine.ts +9 -12
  59. package/src/react/_internal/transaction-machine/useWallet.ts +58 -0
  60. package/src/react/_internal/transaction-machine/wallet.ts +60 -3
  61. package/src/react/_internal/types.ts +11 -0
  62. package/src/react/hooks/useCancelOrder.tsx +26 -30
  63. package/src/react/hooks/useCancelTransactionSteps.tsx +222 -0
  64. package/src/react/hooks/useGetReceiptFromHash.tsx +32 -0
  65. package/src/react/ui/modals/BuyModal/Modal.tsx +97 -0
  66. package/src/react/ui/modals/BuyModal/hooks/useBuyCollectable.ts +109 -0
  67. package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +50 -0
  68. package/src/react/ui/modals/BuyModal/hooks/useFees.ts +38 -0
  69. package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +58 -0
  70. package/src/react/ui/modals/BuyModal/index.tsx +3 -210
  71. package/src/react/ui/modals/BuyModal/modals/CheckoutModal.tsx +29 -0
  72. package/src/react/ui/modals/BuyModal/modals/Modal1155.tsx +84 -0
  73. package/src/react/ui/modals/CreateListingModal/Modal.tsx +150 -207
  74. package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +62 -0
  75. package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +75 -0
  76. package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +216 -0
  77. package/src/react/ui/modals/CreateListingModal/index.tsx +1 -1
  78. package/src/react/ui/modals/CreateListingModal/store.ts +17 -9
  79. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +173 -215
  80. package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +76 -0
  81. package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +62 -0
  82. package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +225 -0
  83. package/src/react/ui/modals/MakeOfferModal/store.ts +15 -2
  84. package/src/react/ui/modals/SellModal/Modal.tsx +117 -190
  85. package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +73 -0
  86. package/src/react/ui/modals/SellModal/hooks/useSell.tsx +65 -0
  87. package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +224 -0
  88. package/src/react/ui/modals/SellModal/store.ts +14 -1
  89. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +26 -1
  90. package/src/react/ui/modals/_internal/components/currencyImage/index.tsx +8 -10
  91. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +9 -1
  92. package/src/react/ui/modals/_internal/components/priceInput/hooks/useBalanceCheck.ts +67 -0
  93. package/src/react/ui/modals/_internal/components/priceInput/hooks/usePriceInput.ts +54 -0
  94. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +49 -62
  95. package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +9 -4
  96. package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +3 -3
  97. package/src/react/ui/modals/_internal/types.ts +1 -1
  98. package/src/react/ui/modals/modal-provider.tsx +1 -1
  99. package/src/utils/_internal/error/transaction.ts +21 -1
  100. package/tsconfig.tsbuildinfo +1 -1
  101. package/dist/chunk-GSDUAHL3.js.map +0 -1
  102. package/dist/chunk-MQ5WSFDH.js.map +0 -1
  103. package/dist/chunk-MTFS5SED.js.map +0 -1
  104. package/dist/chunk-OPMDGQFB.js.map +0 -1
  105. package/dist/chunk-T5T6JNB2.js.map +0 -1
  106. package/dist/chunk-WBJKZOQ7.js.map +0 -1
  107. package/dist/chunk-WQCWBXBM.js.map +0 -1
  108. package/src/react/hooks/useCreateListing.tsx +0 -125
  109. package/src/react/hooks/useMakeOffer.tsx +0 -122
  110. package/src/react/hooks/useSell.tsx +0 -121
  111. /package/dist/{chunk-ZWIRTV7A.js.map → chunk-4VS5NKDD.js.map} +0 -0
  112. /package/dist/{chunk-LSMQVX77.js.map → chunk-CP2IVRMX.js.map} +0 -0
  113. /package/dist/{chunk-4RKM3VUV.js.map → chunk-IQXJZBMR.js.map} +0 -0
  114. /package/dist/{chunk-S5IPE7TH.js.map → chunk-URX7ZHX4.js.map} +0 -0
  115. /package/src/react/ui/modals/BuyModal/{_store.ts → store.ts} +0 -0
@@ -1,19 +1,21 @@
1
1
  import { Box, NumericInput, Text } from '@0xsequence/design-system';
2
2
  import type { Observable } from '@legendapp/state';
3
3
  import { observer } from '@legendapp/state/react';
4
- import { useEffect, useState } from 'react';
5
- import { type Hex, parseUnits } from 'viem';
4
+ import { useCallback, useMemo } from 'react';
5
+ import { type Hex } from 'viem';
6
6
  import { useAccount } from 'wagmi';
7
7
  import type { Price } from '../../../../../../types';
8
- import { useCurrencyBalance } from '../../../../../hooks/useCurrencyBalance';
9
8
  import CurrencyImage from '../currencyImage';
10
9
  import CurrencyOptionsSelect from '../currencyOptionsSelect';
11
10
  import { priceInputCurrencyImage, priceInputWrapper } from './styles.css';
11
+ import { usePriceInput } from './hooks/usePriceInput';
12
+ import { useBalanceCheck } from './hooks/useBalanceCheck';
12
13
 
13
14
  type PriceInputProps = {
14
15
  collectionAddress: Hex;
15
16
  chainId: string;
16
- $listingPrice: Observable<Price | undefined>;
17
+ secondCurrencyAsDefault?: boolean;
18
+ $price: Observable<Price | undefined>;
17
19
  onPriceChange?: () => void;
18
20
  checkBalance?: {
19
21
  enabled: boolean;
@@ -24,58 +26,53 @@ type PriceInputProps = {
24
26
  const PriceInput = observer(function PriceInput({
25
27
  chainId,
26
28
  collectionAddress,
27
- $listingPrice,
29
+ $price,
28
30
  onPriceChange,
29
31
  checkBalance,
32
+ secondCurrencyAsDefault,
30
33
  }: PriceInputProps) {
31
- const [balanceError, setBalanceError] = useState('');
32
34
  const { address: accountAddress } = useAccount();
33
- const { data: balance, isSuccess: isBalanceSuccess } = useCurrencyBalance({
34
- currencyAddress: $listingPrice.currency.contractAddress.get() as Hex,
35
+ const currencyDecimals = $price.currency.decimals.get() || 18;
36
+ const currencyAddress = $price.currency.contractAddress.get() as Hex;
37
+
38
+ const { value, handlePriceChange } = usePriceInput({
39
+ price$: $price,
40
+ currencyDecimals,
41
+ onPriceChange,
42
+ });
43
+
44
+ const { balanceError } = useBalanceCheck({
45
+ checkBalance,
46
+ price$: $price,
47
+ currencyAddress,
35
48
  chainId: Number(chainId),
36
49
  userAddress: accountAddress as Hex,
50
+ currencyDecimals,
37
51
  });
38
52
 
39
- const currencyDecimals = $listingPrice.currency.decimals.get();
40
-
41
- const [value, setValue] = useState('');
42
-
43
- const changeListingPrice = (value: string) => {
44
- setValue(value);
45
- try {
46
- const parsedAmount = parseUnits(value, Number(currencyDecimals));
47
- $listingPrice.amountRaw.set(parsedAmount.toString());
48
- onPriceChange?.();
49
- } catch {
50
- $listingPrice.amountRaw.set('0');
51
- }
52
- };
53
-
54
- const checkInsufficientBalance = (priceAmountRaw: string) => {
55
- const hasInsufficientBalance =
56
- isBalanceSuccess &&
57
- priceAmountRaw &&
58
- currencyDecimals &&
59
- BigInt(priceAmountRaw) > (balance?.value || 0);
60
-
61
- if (!checkBalance) return;
53
+ const renderBalanceError = useMemo(() => {
54
+ if (!balanceError) return null;
62
55
 
63
- if (hasInsufficientBalance) {
64
- setBalanceError('Insufficient balance');
65
- checkBalance.callback(true);
66
- } else {
67
- setBalanceError('');
68
- checkBalance.callback(false);
69
- }
70
- };
56
+ return (
57
+ <Text
58
+ color="negative"
59
+ fontSize="xsmall"
60
+ fontFamily="body"
61
+ fontWeight="semibold"
62
+ position="absolute"
63
+ style={{ bottom: '-13px' }}
64
+ >
65
+ {balanceError}
66
+ </Text>
67
+ );
68
+ }, [balanceError]);
71
69
 
72
- // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
73
- useEffect(() => {
74
- const priceAmountRaw = $listingPrice.amountRaw.get();
75
- if (priceAmountRaw && priceAmountRaw !== '0') {
76
- checkInsufficientBalance(priceAmountRaw);
77
- }
78
- }, [$listingPrice.currency.get()]);
70
+ const handleChange = useCallback(
71
+ (event: React.ChangeEvent<HTMLInputElement>) => {
72
+ handlePriceChange(event.target.value);
73
+ },
74
+ [handlePriceChange],
75
+ );
79
76
 
80
77
  return (
81
78
  <Box className={priceInputWrapper} position="relative">
@@ -86,38 +83,28 @@ const PriceInput = observer(function PriceInput({
86
83
  display="flex"
87
84
  alignItems="center"
88
85
  >
89
- <CurrencyImage $listingPrice={$listingPrice} />
86
+ <CurrencyImage price$={$price} />
90
87
  </Box>
91
88
 
92
89
  <NumericInput
93
- name="listingPrice"
90
+ name="price-input"
94
91
  decimals={currencyDecimals}
95
92
  label="Enter price"
96
93
  labelLocation="top"
97
94
  controls={
98
95
  <CurrencyOptionsSelect
99
- selectedCurrency$={$listingPrice?.currency}
96
+ selectedCurrency$={$price.currency}
100
97
  collectionAddress={collectionAddress}
101
98
  chainId={chainId}
99
+ secondCurrencyAsDefault={secondCurrencyAsDefault}
102
100
  />
103
101
  }
104
102
  value={value}
105
- onChange={(event) => changeListingPrice(event.target.value)}
103
+ onChange={handleChange}
106
104
  width="full"
107
105
  />
108
106
 
109
- {balanceError && (
110
- <Text
111
- color="negative"
112
- fontSize="xsmall"
113
- fontFamily="body"
114
- fontWeight="semibold"
115
- position="absolute"
116
- style={{ bottom: '-13px' }}
117
- >
118
- {balanceError}
119
- </Text>
120
- )}
107
+ {renderBalanceError}
121
108
  </Box>
122
109
  );
123
110
  });
@@ -10,7 +10,7 @@ import { Close, Content, Overlay, Portal, Root } from '@radix-ui/react-dialog';
10
10
  import type { SwitchChainErrorType } from 'viem';
11
11
  import { useSwitchChain } from 'wagmi';
12
12
  import { getPresentableChainName } from '../../../../../../utils/network';
13
- import type { ChainId } from '../../../../../_internal';
13
+ import { getProviderEl, type ChainId } from '../../../../../_internal';
14
14
  import AlertMessage from '../alertMessage';
15
15
  import { switchChainModal$ } from './store';
16
16
  import {
@@ -62,8 +62,8 @@ const SwitchChainModal = observer(() => {
62
62
 
63
63
  return (
64
64
  <Root open={switchChainModal$.isOpen.get()}>
65
- <Portal>
66
- <Overlay className={dialogOverlay} />
65
+ <Portal container={getProviderEl()}>
66
+ <Overlay className={dialogOverlay} />
67
67
 
68
68
  <Content className={switchChainModalContent}>
69
69
  <Text fontSize="large" fontWeight="bold" color="text100">
@@ -93,7 +93,12 @@ const SwitchChainModal = observer(() => {
93
93
 
94
94
  <Close
95
95
  onClick={() => {
96
- switchChainModal$.state.onClose?.();
96
+ if (
97
+ switchChainModal$.state.onClose &&
98
+ typeof switchChainModal$.state.onClose === 'function'
99
+ ) {
100
+ switchChainModal$.state.onClose();
101
+ }
97
102
  switchChainModal$.delete();
98
103
  }}
99
104
  className={closeButton}
@@ -13,7 +13,7 @@ import { useEffect, useState } from 'react';
13
13
  import { type Hex, WaitForTransactionReceiptTimeoutError } from 'viem';
14
14
  import type { Price } from '../../../../../../types';
15
15
  import { getPublicRpcClient } from '../../../../../../utils';
16
- import { getQueryClient } from '../../../../../_internal';
16
+ import { getProviderEl, getQueryClient } from '../../../../../_internal';
17
17
  import type { TransactionType } from '../../../../../_internal/transaction-machine/execute-transaction';
18
18
  import { useCollectible } from '../../../../../hooks';
19
19
  import type { ModalCallbacks } from '../../types';
@@ -87,7 +87,7 @@ const TransactionStatusModal = observer(() => {
87
87
  console.log('receipt', receipt);
88
88
  setTransactionStatus('SUCCESS');
89
89
  if (callbacks?.onSuccess) {
90
- callbacks.onSuccess(hash || '0x');
90
+ callbacks.onSuccess({ hash: hash || '0x0' });
91
91
  } else {
92
92
  console.debug('onSuccess callback not provided:', hash);
93
93
  }
@@ -148,7 +148,7 @@ const TransactionStatusModal = observer(() => {
148
148
 
149
149
  return (
150
150
  <Root open={transactionStatusModal$.isOpen.get()}>
151
- <Portal>
151
+ <Portal container={getProviderEl()}>
152
152
  <Overlay className={dialogOverlay} />
153
153
 
154
154
  <Content className={transactionStatusModalContent}>
@@ -1,7 +1,7 @@
1
1
  import type { Hash, Hex } from 'viem';
2
2
 
3
3
  export type ModalCallbacks = {
4
- onSuccess?: (hash: Hash) => void;
4
+ onSuccess?: ({ hash, orderId }: { hash?: Hash; orderId?: string }) => void;
5
5
  onError?: (error: Error) => void;
6
6
  };
7
7
 
@@ -1,6 +1,5 @@
1
1
  import { observer } from '@legendapp/state/react';
2
2
  import { AccountModal } from './Account';
3
- import { BuyModal } from './BuyModal';
4
3
  import { MakeOfferModal } from './MakeOfferModal/Modal';
5
4
  import { SellModal } from './SellModal/Modal';
6
5
  import SuccessfulPurchaseModal from './SuccessfulPurchaseModal';
@@ -9,6 +8,7 @@ import SwitchChainModal from './_internal/components/switchChainModal';
9
8
  import TransactionStatusModal from './_internal/components/transactionStatusModal';
10
9
  import { _accountModalOpen$ } from './_internal/stores/accountModal';
11
10
  import { CreateListingModal } from './CreateListingModal/Modal';
11
+ import { BuyModal } from './BuyModal/Modal';
12
12
 
13
13
  export const ModalProvider = observer(() => {
14
14
  return (
@@ -21,6 +21,15 @@ export class ChainSwitchError extends TransactionError {
21
21
  }
22
22
  }
23
23
 
24
+ export class ChainSwitchUserRejectedError extends TransactionError {
25
+ override name = 'ChainSwitchUserRejectedError';
26
+ constructor() {
27
+ super('User rejected chain switch', {
28
+ details: 'The user rejected the chain switch request.',
29
+ });
30
+ }
31
+ }
32
+
24
33
  export class TransactionExecutionError extends TransactionError {
25
34
  override name = 'TransactionExecutionError';
26
35
  constructor(stepId: string, cause?: Error) {
@@ -353,6 +362,15 @@ export class OrdersFetchError extends TransactionError {
353
362
  }
354
363
  }
355
364
 
365
+ export class WalletInstanceNotFoundError extends TransactionError {
366
+ override name = 'WalletInstanceNotFoundError';
367
+ constructor() {
368
+ super('Wallet instance not found', {
369
+ details: 'The wallet instance is undefined',
370
+ });
371
+ }
372
+ }
373
+
356
374
  export type TransactionErrorTypes =
357
375
  | ChainIdUnavailableError
358
376
  | TransactionReceiptError
@@ -384,8 +402,10 @@ export type TransactionErrorTypes =
384
402
  | UserRejectedRequestError
385
403
  | NoMarketplaceConfigError
386
404
  | InsufficientFundsError
405
+ | ChainSwitchUserRejectedError
387
406
  | ChainSwitchError
388
407
  | TransactionSignatureError
389
408
  | TransactionExecutionError
390
409
  | NoWalletConnectedError
391
- | TransactionError;
410
+ | TransactionError
411
+ | WalletInstanceNotFoundError;
@@ -1 +1 @@
1
- {"root":["./src/consts.ts","./src/index.ts","./src/react/index.ts","./src/react/provider.tsx","./src/react/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/types.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/transaction-machine/execute-transaction.ts","./src/react/_internal/transaction-machine/logger.ts","./src/react/_internal/transaction-machine/usetransactionmachine.ts","./src/react/_internal/transaction-machine/utils.ts","./src/react/_internal/transaction-machine/wallet.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/hooks/index.ts","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usebuycollectable.tsx","./src/react/hooks/usecancelorder.tsx","./src/react/hooks/usecheckoutoptions.tsx","./src/react/hooks/usecollectible.tsx","./src/react/hooks/usecollection.tsx","./src/react/hooks/useconfig.tsx","./src/react/hooks/usecountlistingsforcollectible.tsx","./src/react/hooks/usecountofcollectables.tsx","./src/react/hooks/usecountoffersforcollectible.tsx","./src/react/hooks/usecreatelisting.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/usehighestoffer.tsx","./src/react/hooks/uselistbalances.tsx","./src/react/hooks/uselistcollectibles.tsx","./src/react/hooks/uselistcollections.tsx","./src/react/hooks/uselistlistingsforcollectible.tsx","./src/react/hooks/uselistoffersforcollectible.tsx","./src/react/hooks/uselowestlisting.tsx","./src/react/hooks/usemakeoffer.tsx","./src/react/hooks/usemarketplaceconfig.tsx","./src/react/hooks/useroyaltypercentage.tsx","./src/react/hooks/usesell.tsx","./src/react/hooks/usetransfertokens.tsx","./src/react/hooks/options/marketplaceconfigoptions.ts","./src/react/ssr/create-ssr-client.ts","./src/react/ssr/index.ts","./src/react/ui/index.ts","./src/react/ui/components/index.ts","./src/react/ui/components/_internals/action-button/actionbutton.tsx","./src/react/ui/components/_internals/action-button/types.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/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/styles.css.ts","./src/react/ui/icons/arrowup.tsx","./src/react/ui/icons/bell.tsx","./src/react/ui/icons/calendaricon.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/account/index.tsx","./src/react/ui/modals/buymodal/_store.ts","./src/react/ui/modals/buymodal/index.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/makeoffermodal/modal.tsx","./src/react/ui/modals/makeoffermodal/index.tsx","./src/react/ui/modals/makeoffermodal/store.ts","./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/successfulpurchasemodal/_store.ts","./src/react/ui/modals/successfulpurchasemodal/index.tsx","./src/react/ui/modals/successfulpurchasemodal/styles.css.ts","./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/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/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/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/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/index.ts","./src/utils/network.ts","./src/utils/price.ts","./src/utils/_internal/error/base.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/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/types.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/transaction-machine/execute-transaction.ts","./src/react/_internal/transaction-machine/logger.ts","./src/react/_internal/transaction-machine/usetransactionmachine.ts","./src/react/_internal/transaction-machine/usewallet.ts","./src/react/_internal/transaction-machine/utils.ts","./src/react/_internal/transaction-machine/wallet.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/hooks/index.ts","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usebuycollectable.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/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/uselistcollectibles.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/ssr/create-ssr-client.ts","./src/react/ssr/index.ts","./src/react/ui/index.ts","./src/react/ui/components/index.ts","./src/react/ui/components/_internals/action-button/actionbutton.tsx","./src/react/ui/components/_internals/action-button/types.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/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/styles.css.ts","./src/react/ui/icons/arrowup.tsx","./src/react/ui/icons/bell.tsx","./src/react/ui/icons/calendaricon.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/account/index.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/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/modals/checkoutmodal.tsx","./src/react/ui/modals/buymodal/modals/modal1155.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/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/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/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/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/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/hooks/usebalancecheck.ts","./src/react/ui/modals/_internal/components/priceinput/hooks/usepriceinput.ts","./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/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/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/index.ts","./src/utils/network.ts","./src/utils/price.ts","./src/utils/_internal/error/base.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 +0,0 @@
1
- {"version":3,"sources":["../src/utils/_internal/error/base.ts","../src/utils/_internal/error/transaction.ts"],"sourcesContent":["export type ErrorType<name extends string = 'Error'> = Error & { name: name };\n\nexport type Compute<type> = { [key in keyof type]: type[key] } & unknown;\n\ntype BaseErrorOptions = Compute<\n\t{ details?: string | undefined } | { cause: BaseError | Error }\n>;\n\nexport class BaseError extends Error {\n\tdetails: string;\n\tshortMessage: string;\n\n\tname = 'MarketplaceSdkBaseError';\n\n\tconstructor(shortMessage: string, options: BaseErrorOptions = {}) {\n\t\tsuper();\n\n\t\tconst details = 'details' in options ? options.details : '';\n\t\tthis.message = [\n\t\t\tshortMessage || 'An error occurred.',\n\t\t\t'',\n\t\t\t...(details ? [`Details: ${details}`] : []),\n\t\t].join('\\n');\n\n\t\tif ('cause' in options && options.cause) {\n\t\t\tthis.cause = options.cause;\n\t\t}\n\n\t\tthis.details = details || '';\n\t\tthis.shortMessage = shortMessage;\n\t}\n}\n","import type { Address } from 'viem';\nimport { BaseError } from './base';\n\nexport type TransactionErrorType<name extends string = 'TransactionError'> =\n\tBaseError & { name: name };\n\nexport class TransactionError extends BaseError {\n\toverride name = 'TransactionError';\n}\n\nexport class ChainSwitchError extends TransactionError {\n\toverride name = 'ChainSwitchError';\n\tconstructor(currentChainId: number, targetChainId: number) {\n\t\tsuper(\n\t\t\t`Failed to switch network from ${currentChainId} to ${targetChainId}`,\n\t\t\t{\n\t\t\t\tdetails:\n\t\t\t\t\t'The user may have rejected the network switch or there might be a network connectivity issue.',\n\t\t\t},\n\t\t);\n\t}\n}\n\nexport class TransactionExecutionError extends TransactionError {\n\toverride name = 'TransactionExecutionError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to execute transaction step: ${stepId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction may have been rejected or failed during execution.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class TransactionSignatureError extends TransactionError {\n\toverride name = 'TransactionSignatureError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to sign transaction step: ${stepId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The signature request may have been rejected by the user.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class NoWalletConnectedError extends TransactionError {\n\toverride name = 'NoWalletConnectedError';\n\tconstructor() {\n\t\tsuper('No wallet connected', {\n\t\t\tdetails: 'Please connect your wallet before attempting this transaction.',\n\t\t});\n\t}\n}\n\nexport class NoMarketplaceConfigError extends TransactionError {\n\toverride name = 'NoMarketplaceConfigError';\n\tconstructor() {\n\t\tsuper('Marketplace configuration not found', {\n\t\t\tdetails:\n\t\t\t\t'The marketplace configuration is missing or invalid. This could be due to an initialization error.',\n\t\t});\n\t}\n}\n\nexport class UserRejectedRequestError extends TransactionError {\n\toverride name = 'UserRejectedRequestError';\n\tconstructor() {\n\t\tsuper('User rejected the request', {\n\t\t\tdetails: 'The user cancelled or rejected the transaction request.',\n\t\t});\n\t}\n}\n\nexport class InsufficientFundsError extends TransactionError {\n\toverride name = 'InsufficientFundsError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Insufficient funds for transaction', {\n\t\t\tdetails:\n\t\t\t\t'The wallet does not have enough funds to complete this transaction.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class SignatureExecutionError extends TransactionError {\n\toverride name = 'SignatureExecutionError';\n\tconstructor(signature: string, cause?: Error) {\n\t\tsuper(`Failed to execute signature: ${signature}`, {\n\t\t\tdetails: cause?.message || 'The execution of the signature failed.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class StepExecutionError extends TransactionError {\n\toverride name = 'StepExecutionError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to execute step ${stepId})`, {\n\t\t\tdetails: cause?.message || 'The step execution failed unexpectedly.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class StepGenerationError extends TransactionError {\n\toverride name = 'StepGenerationError';\n\tconstructor(transactionType: string, cause?: Error) {\n\t\tsuper(`Failed to generate steps for ${transactionType}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message || 'Could not generate the required transaction steps.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class PaymentModalError extends TransactionError {\n\toverride name = 'PaymentModalError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Payment modal operation failed', {\n\t\t\tdetails:\n\t\t\t\tcause?.message || 'The payment modal operation was unsuccessful.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class InvalidStepError extends TransactionError {\n\toverride name = 'InvalidStepError';\n\tconstructor(stepId: string, reason: string) {\n\t\tsuper(`Invalid step configuration for ${stepId}`, {\n\t\t\tdetails: reason,\n\t\t});\n\t}\n}\n\nexport class TransactionConfirmationError extends TransactionError {\n\toverride name = 'TransactionConfirmationError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Failed to confirm transaction ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction could not be confirmed on the network.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class OrderNotFoundError extends TransactionError {\n\toverride name = 'OrderNotFoundError';\n\tconstructor(orderId: string) {\n\t\tsuper(`Order ${orderId} not found`, {\n\t\t\tdetails: 'The requested order could not be found in the marketplace.',\n\t\t});\n\t}\n}\n\nexport class MissingStepDataError extends TransactionError {\n\toverride name = 'MissingStepDataError';\n\tconstructor() {\n\t\tsuper('Step is missing required data', {\n\t\t\tdetails:\n\t\t\t\t'The transaction step is missing required \"to\" or \"signature\" data.',\n\t\t});\n\t}\n}\n\nexport class MissingSignatureDataError extends TransactionError {\n\toverride name = 'MissingSignatureDataError';\n\tconstructor() {\n\t\tsuper('Step is missing signature data', {\n\t\t\tdetails:\n\t\t\t\t'The signature step is missing required signature data configuration.',\n\t\t});\n\t}\n}\n\nexport class InvalidSignatureStepError extends TransactionError {\n\toverride name = 'InvalidSignatureStepError';\n\tconstructor(stepId: string) {\n\t\tsuper(`Invalid signature step type: ${stepId}`, {\n\t\t\tdetails: 'The signature step type is not supported.',\n\t\t});\n\t}\n}\n\nexport class MissingPostStepError extends TransactionError {\n\toverride name = 'MissingPostStepError';\n\tconstructor() {\n\t\tsuper('Missing post step configuration', {\n\t\t\tdetails:\n\t\t\t\t'The signature step is missing required post-step configuration.',\n\t\t});\n\t}\n}\n\nexport class UnexpectedStepsError extends TransactionError {\n\toverride name = 'UnexpectedStepsError';\n\tconstructor() {\n\t\tsuper('Unexpected steps found', {\n\t\t\tdetails: 'The transaction contains more steps than expected.',\n\t\t});\n\t}\n}\n\nexport class NoExecutionStepError extends TransactionError {\n\toverride name = 'NoExecutionStepError';\n\tconstructor() {\n\t\tsuper('No execution step found', {\n\t\t\tdetails: 'The transaction is missing the required execution step.',\n\t\t});\n\t}\n}\n\nexport class NoStepsFoundError extends TransactionError {\n\toverride name = 'NoStepsFoundError';\n\tconstructor() {\n\t\tsuper('No steps found', {\n\t\t\tdetails: 'The transaction contains no steps to execute.',\n\t\t});\n\t}\n}\n\nexport class UnknownTransactionTypeError extends TransactionError {\n\toverride name = 'UnknownTransactionTypeError';\n\tconstructor(type: string) {\n\t\tsuper(`Unknown transaction type: ${type}`, {\n\t\t\tdetails: 'The specified transaction type is not supported.',\n\t\t});\n\t}\n}\n\nexport class InvalidContractTypeError extends TransactionError {\n\toverride name = 'InvalidContractTypeError';\n\tconstructor(contractType: string | undefined) {\n\t\tsuper(`Invalid contract type: ${contractType}`, {\n\t\t\tdetails: 'The contract type must be either ERC721 or ERC1155.',\n\t\t});\n\t}\n}\n\nexport class CollectionNotFoundError extends TransactionError {\n\toverride name = 'CollectionNotFoundError';\n\tconstructor(collectionAddress: string) {\n\t\tsuper(`Collection not found: ${collectionAddress}`, {\n\t\t\tdetails:\n\t\t\t\t'The specified collection address could not be found in the marketplace configuration.',\n\t\t});\n\t}\n}\n\nexport class InvalidCurrencyOptionsError extends TransactionError {\n\toverride name = 'InvalidCurrencyOptionsError';\n\tconstructor(currencyOptions: Address[]) {\n\t\tsuper(`Invalid currency options: ${currencyOptions}`, {\n\t\t\tdetails:\n\t\t\t\t'The currency options must be an array of valid currency contract addresses.',\n\t\t});\n\t}\n}\n\nexport class ProjectNotFoundError extends TransactionError {\n\toverride name = 'ProjectNotFoundError';\n\tconstructor(projectId: string, url: string) {\n\t\tsuper('Project not found', {\n\t\t\tdetails: `Project id: ${projectId} not found at ${url}`,\n\t\t});\n\t}\n}\n\nexport class MarketplaceConfigFetchError extends TransactionError {\n\toverride name = 'MarketplaceConfigFetchError';\n\tconstructor(message: string) {\n\t\tsuper('Failed to fetch marketplace config', {\n\t\t\tdetails: message,\n\t\t});\n\t}\n}\n\nexport class MissingConfigError extends TransactionError {\n\toverride name = 'MissingConfigError';\n\tconstructor(configName: string) {\n\t\tsuper(`Missing required config: ${configName}`, {\n\t\t\tdetails: 'A required configuration parameter is missing.',\n\t\t});\n\t}\n}\n\nexport class TransactionValidationError extends TransactionError {\n\toverride name = 'TransactionValidationError';\n\tconstructor(reason: string) {\n\t\tsuper('Transaction validation failed', {\n\t\t\tdetails: reason,\n\t\t});\n\t}\n}\n\nexport class ChainIdUnavailableError extends TransactionError {\n\toverride name = 'ChainIdUnavailableError';\n\tconstructor() {\n\t\tsuper('Chain ID is not available', {\n\t\t\tdetails: 'Could not determine the current chain ID from the wallet.',\n\t\t});\n\t}\n}\n\nexport class TransactionReceiptError extends TransactionError {\n\toverride name = 'TransactionReceiptError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Failed to get transaction receipt for ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the transaction receipt from the network.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class PaymentModalTransactionError extends TransactionError {\n\toverride name = 'PaymentModalTransactionError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Payment modal transaction failed for ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction initiated from the payment modal failed.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class CheckoutOptionsError extends TransactionError {\n\toverride name = 'CheckoutOptionsError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Failed to get checkout options', {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the checkout options from the marketplace.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class OrdersFetchError extends TransactionError {\n\toverride name = 'OrdersFetchError';\n\tconstructor(orderId: string, cause?: Error) {\n\t\tsuper(`Failed to fetch order ${orderId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the order details from the marketplace.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport type TransactionErrorTypes =\n\t| ChainIdUnavailableError\n\t| TransactionReceiptError\n\t| PaymentModalTransactionError\n\t| CheckoutOptionsError\n\t| OrdersFetchError\n\t| TransactionConfirmationError\n\t| TransactionValidationError\n\t| MissingConfigError\n\t| MarketplaceConfigFetchError\n\t| ProjectNotFoundError\n\t| CollectionNotFoundError\n\t| InvalidCurrencyOptionsError\n\t| InvalidContractTypeError\n\t| UnknownTransactionTypeError\n\t| NoStepsFoundError\n\t| NoExecutionStepError\n\t| UnexpectedStepsError\n\t| MissingPostStepError\n\t| InvalidSignatureStepError\n\t| MissingSignatureDataError\n\t| MissingStepDataError\n\t| OrderNotFoundError\n\t| TransactionConfirmationError\n\t| InvalidStepError\n\t| PaymentModalError\n\t| StepGenerationError\n\t| StepExecutionError\n\t| UserRejectedRequestError\n\t| NoMarketplaceConfigError\n\t| InsufficientFundsError\n\t| ChainSwitchError\n\t| TransactionSignatureError\n\t| TransactionExecutionError\n\t| NoWalletConnectedError\n\t| TransactionError;\n"],"mappings":";AAQO,IAAM,YAAN,cAAwB,MAAM;AAAA,EACpC;AAAA,EACA;AAAA,EAEA,OAAO;AAAA,EAEP,YAAY,cAAsB,UAA4B,CAAC,GAAG;AACjE,UAAM;AAEN,UAAM,UAAU,aAAa,UAAU,QAAQ,UAAU;AACzD,SAAK,UAAU;AAAA,MACd,gBAAgB;AAAA,MAChB;AAAA,MACA,GAAI,UAAU,CAAC,YAAY,OAAO,EAAE,IAAI,CAAC;AAAA,IAC1C,EAAE,KAAK,IAAI;AAEX,QAAI,WAAW,WAAW,QAAQ,OAAO;AACxC,WAAK,QAAQ,QAAQ;AAAA,IACtB;AAEA,SAAK,UAAU,WAAW;AAC1B,SAAK,eAAe;AAAA,EACrB;AACD;;;ACzBO,IAAM,mBAAN,cAA+B,UAAU;AAAA,EACtC,OAAO;AACjB;AAgRO,IAAM,qBAAN,cAAiC,iBAAiB;AAAA,EAC/C,OAAO;AAAA,EAChB,YAAY,YAAoB;AAC/B,UAAM,4BAA4B,UAAU,IAAI;AAAA,MAC/C,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx","../src/react/ui/modals/_internal/components/waasFeeOptionsBox/index.tsx","../src/react/hooks/useCurrencyBalance.tsx","../src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx","../src/react/ui/components/_internals/custom-select/CustomSelect.tsx","../src/react/ui/components/_internals/custom-select/styles.css.ts","../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/actionModal/store.ts"],"sourcesContent":["'use client';\n\nimport type React from 'react';\nimport { useState, type ComponentProps } from 'react';\n\nimport {\n\tBox,\n\tButton,\n\tCloseIcon,\n\tIconButton,\n\tSpinner,\n\tText,\n} from '@0xsequence/design-system';\nimport { observer } from '@legendapp/state/react';\nimport { Close, Content, Overlay, Portal, Root } from '@radix-ui/react-dialog';\nimport { getProviderEl } from '../../../../../_internal';\nimport {\n\tcloseButton,\n\tcta as ctaStyle,\n\tdialogContent,\n\tdialogOverlay,\n} from './styles.css';\nimport WaasFeeOptionsBox from '../waasFeeOptionsBox';\n\nexport interface ActionModalProps {\n\tisOpen: boolean;\n\tonClose: () => void;\n\ttitle: string;\n\tchildren: React.ReactNode;\n\tctas: {\n\t\tlabel: string;\n\t\tonClick: (() => Promise<void>) | (() => void);\n\t\tpending?: boolean;\n\t\tdisabled?: boolean;\n\t\thidden?: boolean;\n\t\tvariant?: ComponentProps<typeof Button>['variant'];\n\t}[];\n\tchainId: number;\n}\n\nexport const ActionModal = observer(\n\t({ isOpen, onClose, title, children, ctas, chainId }: ActionModalProps) => {\n\t\tconst [isSelectingFees, setIsSelectingFees] = useState(false);\n\n\t\treturn (\n\t\t\t<Root open={isOpen && !!chainId}>\n\t\t\t\t<Portal container={getProviderEl()}>\n\t\t\t\t\t<Overlay className={dialogOverlay} />\n\t\t\t\t\t<Content className={dialogContent.narrow}>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tdisplay=\"flex\"\n\t\t\t\t\t\t\tflexGrow={'1'}\n\t\t\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\t\t\tflexDirection=\"column\"\n\t\t\t\t\t\t\tgap=\"4\"\n\t\t\t\t\t\t\tposition={'relative'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tfontSize=\"medium\"\n\t\t\t\t\t\t\t\tfontWeight=\"bold\"\n\t\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t\twidth=\"full\"\n\t\t\t\t\t\t\t\tcolor=\"text100\"\n\t\t\t\t\t\t\t\tfontFamily=\"body\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t{children}\n\n\t\t\t\t\t\t\t<Box width=\"full\" display=\"flex\" flexDirection=\"column\" gap=\"2\">\n\t\t\t\t\t\t\t\t{ctas.map(\n\t\t\t\t\t\t\t\t\t(cta) =>\n\t\t\t\t\t\t\t\t\t\t!cta.hidden && (\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tkey={cta.label}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={ctaStyle}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait cta.onClick();\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={cta.variant || 'primary'}\n\t\t\t\t\t\t\t\t\t\t\t\tpending={cta.pending}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={cta.disabled || isSelectingFees}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\t\t\t\t\t\t\twidth=\"full\"\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay=\"flex\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgap=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{cta.pending && <Spinner size=\"sm\" />}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{cta.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\n\t\t\t\t\t\t<WaasFeeOptionsBox\n\t\t\t\t\t\t\tchainId={chainId}\n\t\t\t\t\t\t\tonFeeOptionsLoaded={() => setIsSelectingFees(true)}\n\t\t\t\t\t\t\tonFeeOptionConfirmed={() => setIsSelectingFees(false)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<Close className={closeButton} asChild onClick={onClose}>\n\t\t\t\t\t\t\t<IconButton size=\"xs\" aria-label=\"Close modal\" icon={CloseIcon} />\n\t\t\t\t\t\t</Close>\n\t\t\t\t\t</Content>\n\t\t\t\t</Portal>\n\t\t\t</Root>\n\t\t);\n\t},\n);\n","import {\n\tBox,\n\tButton,\n\tSkeleton,\n\tText,\n\tWarningIcon,\n} from '@0xsequence/design-system';\nimport { useWaasFeeOptions } from '@0xsequence/kit';\nimport { observer } from '@legendapp/state/react';\nimport { useEffect } from 'react';\nimport { type Hex, zeroAddress } from 'viem';\nimport { useAccount } from 'wagmi';\nimport { useCurrencyBalance } from '../../../../../hooks/useCurrencyBalance';\nimport WaasFeeOptionsSelect, {\n\ttype FeeOption,\n} from '../waasFeeOptionsSelect/WaasFeeOptionsSelect';\nimport { waasFeeOptionsModal$ } from './store';\nimport { feeOptionsWrapper } from './styles.css';\n\ntype WaasFeeOptionsBoxProps = {\n\tonFeeOptionsLoaded: () => void;\n\tonFeeOptionConfirmed: () => void;\n\tchainId: number;\n};\n\nconst WaasFeeOptionsBox = observer(\n\t({\n\t\tonFeeOptionsLoaded,\n\t\tonFeeOptionConfirmed,\n\t\tchainId,\n\t}: WaasFeeOptionsBoxProps) => {\n\t\tconst { address: userAddress } = useAccount();\n\t\tconst selectedFeeOption$ = waasFeeOptionsModal$.selectedFeeOption;\n\t\tconst [pendingFeeOptionConfirmation, confirmPendingFeeOption] =\n\t\t\tuseWaasFeeOptions();\n\t\tconst { data: currencyBalance, isLoading: currencyBalanceLoading } =\n\t\t\tuseCurrencyBalance({\n\t\t\t\tchainId,\n\t\t\t\tcurrencyAddress: (selectedFeeOption$.token.contractAddress.get() ||\n\t\t\t\t\tzeroAddress) as Hex,\n\t\t\t\tuserAddress: userAddress as Hex,\n\t\t\t});\n\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>\n\t\tuseEffect(() => {\n\t\t\tif (pendingFeeOptionConfirmation) {\n\t\t\t\tonFeeOptionsLoaded();\n\t\t\t}\n\t\t}, [pendingFeeOptionConfirmation]);\n\n\t\tconst selectedFeeOption = selectedFeeOption$.get();\n\t\tconst insufficientBalance = (() => {\n\t\t\tif (!selectedFeeOption?.value || !selectedFeeOption.token.decimals) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!currencyBalance?.value && currencyBalance?.value !== 0n) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst feeValue = BigInt(selectedFeeOption.value);\n\t\t\t\treturn currencyBalance.value === 0n || currencyBalance.value < feeValue;\n\t\t\t} catch {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t})();\n\n\t\tconst handleConfirmFeeOption = () => {\n\t\t\tif (!selectedFeeOption?.token || !pendingFeeOptionConfirmation?.id)\n\t\t\t\treturn;\n\n\t\t\tconfirmPendingFeeOption(\n\t\t\t\tpendingFeeOptionConfirmation?.id,\n\t\t\t\tselectedFeeOption.token.contractAddress || zeroAddress,\n\t\t\t);\n\n\t\t\tonFeeOptionConfirmed();\n\t\t};\n\n\t\tif (!pendingFeeOptionConfirmation) return null;\n\n\t\treturn (\n\t\t\t<Box className={feeOptionsWrapper}>\n\t\t\t\t<Text\n\t\t\t\t\tfontSize=\"medium\"\n\t\t\t\t\tfontFamily=\"body\"\n\t\t\t\t\tfontWeight=\"bold\"\n\t\t\t\t\tmarginBottom=\"2\"\n\t\t\t\t>\n\t\t\t\t\tSelect a fee option\n\t\t\t\t</Text>\n\n\t\t\t\t<WaasFeeOptionsSelect\n\t\t\t\t\toptions={(pendingFeeOptionConfirmation?.options as FeeOption[]) || []}\n\t\t\t\t\tselectedFeeOption$={selectedFeeOption$}\n\t\t\t\t/>\n\n\t\t\t\t<Box\n\t\t\t\t\tdisplay=\"flex\"\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\twidth=\"full\"\n\t\t\t\t>\n\t\t\t\t\t{currencyBalanceLoading ? (\n\t\t\t\t\t\t<Skeleton style={{ height: 15 }} borderRadius=\"md\" width=\"1/3\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Box display=\"flex\" alignItems=\"center\" gap=\"2\">\n\t\t\t\t\t\t\t{insufficientBalance && (\n\t\t\t\t\t\t\t\t<WarningIcon color=\"negative\" size=\"xs\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tfontSize=\"small\"\n\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\tfontFamily=\"body\"\n\t\t\t\t\t\t\t\tcolor={insufficientBalance ? 'negative' : 'text100'}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tYou have {currencyBalance?.formatted || '0'}{' '}\n\t\t\t\t\t\t\t\t{selectedFeeOption?.token.symbol}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t!selectedFeeOption?.token ||\n\t\t\t\t\t\t\tinsufficientBalance ||\n\t\t\t\t\t\t\tcurrencyBalanceLoading\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpending={currencyBalanceLoading}\n\t\t\t\t\t\tonClick={handleConfirmFeeOption}\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t<Box display=\"flex\" alignItems=\"center\" gap=\"2\">\n\t\t\t\t\t\t\t\tConfirm\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvariant={insufficientBalance ? 'danger' : 'primary'}\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t/>\n\t\t\t\t</Box>\n\t\t\t</Box>\n\t\t);\n\t},\n);\n\nexport default WaasFeeOptionsBox;\n","import { useQuery } from '@tanstack/react-query';\nimport { type Address, erc20Abi, formatUnits, zeroAddress } from 'viem';\nimport { getPublicRpcClient } from '../../utils';\n\nexport function useCurrencyBalance({\n\tcurrencyAddress,\n\tchainId,\n\tuserAddress,\n}: {\n\tcurrencyAddress: Address;\n\tchainId: number;\n\tuserAddress: Address;\n}) {\n\tconst publicClient = getPublicRpcClient(chainId);\n\n\treturn useQuery({\n\t\tqueryKey: ['balance', currencyAddress, chainId, userAddress],\n\t\tqueryFn: async () => {\n\t\t\tif (!userAddress) return null;\n\n\t\t\tif (currencyAddress === zeroAddress) {\n\t\t\t\tconst balance = await publicClient.getBalance({\n\t\t\t\t\taddress: userAddress,\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\tvalue: balance,\n\t\t\t\t\tformatted: formatUnits(balance, 18),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst [balance, decimals] = await Promise.all([\n\t\t\t\tpublicClient.readContract({\n\t\t\t\t\taddress: currencyAddress,\n\t\t\t\t\tabi: erc20Abi,\n\t\t\t\t\tfunctionName: 'balanceOf',\n\t\t\t\t\targs: [userAddress],\n\t\t\t\t}),\n\t\t\t\tpublicClient.readContract({\n\t\t\t\t\taddress: currencyAddress,\n\t\t\t\t\tabi: erc20Abi,\n\t\t\t\t\tfunctionName: 'decimals',\n\t\t\t\t}),\n\t\t\t]);\n\n\t\t\treturn {\n\t\t\t\tvalue: balance,\n\t\t\t\tformatted: formatUnits(balance, decimals),\n\t\t\t};\n\t\t},\n\t\tenabled: !!userAddress && !!chainId && !!currencyAddress,\n\t});\n}\n","import { Box, Image, Text } from '@0xsequence/design-system';\nimport type { Observable } from '@legendapp/state';\nimport { observer } from '@legendapp/state/react';\nimport { useEffect } from 'react';\nimport { formatUnits } from 'viem';\nimport {\n\tCustomSelect,\n\ttype SelectItem,\n} from '../../../../components/_internals/custom-select/CustomSelect';\n\nexport type FeeOption = {\n\tgasLimit: number;\n\tto: string;\n\ttoken: {\n\t\tchainId: number;\n\t\tcontractAddress: string | null;\n\t\tdecimals: number;\n\t\tlogoURL: string;\n\t\tname: string;\n\t\tsymbol: string;\n\t\ttokenID: string | null;\n\t\ttype: string;\n\t};\n\tvalue: string;\n};\n\nconst WaasFeeOptionsSelect = observer(\n\t({\n\t\toptions,\n\t\tselectedFeeOption$,\n\t}: {\n\t\toptions: FeeOption[];\n\t\tselectedFeeOption$: Observable<FeeOption | undefined>;\n\t}) => {\n\t\tconst feeOptions = options\n\t\t\t.filter((option) => option.token.contractAddress !== null)\n\t\t\t.map((option) => {\n\t\t\t\tconst value = option.token.contractAddress ?? '';\n\t\t\t\treturn FeeOptionSelectItem({ value, option });\n\t\t\t});\n\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>\n\t\tuseEffect(() => {\n\t\t\tif (options.length > 0 && !selectedFeeOption$.get())\n\t\t\t\tselectedFeeOption$.set(options[0]);\n\t\t}, [options]);\n\n\t\tif (options.length === 0 || !selectedFeeOption$.get()?.token) return null;\n\n\t\treturn (\n\t\t\t<CustomSelect\n\t\t\t\titems={feeOptions}\n\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\tconst selectedOption = options.find(\n\t\t\t\t\t\t(option) => option.token.contractAddress === value,\n\t\t\t\t\t);\n\n\t\t\t\t\tselectedFeeOption$.set(selectedOption);\n\t\t\t\t}}\n\t\t\t\tdefaultValue={\n\t\t\t\t\tselectedFeeOption$.get()?.token.contractAddress\n\t\t\t\t\t\t? FeeOptionSelectItem({\n\t\t\t\t\t\t\t\tvalue: selectedFeeOption$.get()?.token.contractAddress ?? '',\n\t\t\t\t\t\t\t\toption: selectedFeeOption$.get() ?? options[0],\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nfunction FeeOptionSelectItem({\n\tvalue,\n\toption,\n}: {\n\tvalue: string;\n\toption: FeeOption;\n}) {\n\treturn {\n\t\tvalue,\n\t\tcontent: (\n\t\t\t<Box display=\"flex\" alignItems=\"center\" gap=\"2\">\n\t\t\t\t<Image\n\t\t\t\t\tsrc={option.token.logoURL}\n\t\t\t\t\talt={option.token.symbol}\n\t\t\t\t\twidth=\"3\"\n\t\t\t\t\theight=\"3\"\n\t\t\t\t/>\n\n\t\t\t\t<Box display=\"flex\" gap=\"1\">\n\t\t\t\t\t<Text color=\"text100\" fontSize=\"small\" fontFamily=\"body\">\n\t\t\t\t\t\tFee\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tcolor=\"text50\"\n\t\t\t\t\t\tfontSize=\"small\"\n\t\t\t\t\t\tfontFamily=\"body\"\n\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t>\n\t\t\t\t\t\t(in {option.token.symbol})\n\t\t\t\t\t</Text>\n\n\t\t\t\t\t<Text color=\"text100\" fontSize=\"small\" fontFamily=\"body\">\n\t\t\t\t\t\t:\n\t\t\t\t\t</Text>\n\t\t\t\t</Box>\n\n\t\t\t\t<Text fontSize=\"small\" fontFamily=\"body\">\n\t\t\t\t\t{formatUnits(BigInt(option.value), option.token.decimals || 0)}\n\t\t\t\t</Text>\n\t\t\t</Box>\n\t\t),\n\t} as SelectItem;\n}\n\nexport default WaasFeeOptionsSelect;\n","import { CheckmarkIcon, ChevronDownIcon } from '@0xsequence/design-system';\nimport * as Select from '@radix-ui/react-select';\nimport React, { type ReactNode } from 'react';\nimport { content, item, itemIndicator, trigger } from './styles.css';\n\nexport interface SelectItem {\n\tvalue: string;\n\tcontent: ReactNode;\n\tdisabled?: boolean;\n}\n\ninterface CustomSelectProps {\n\titems: SelectItem[];\n\tonValueChange?: (value: string) => void;\n\tdefaultValue?: SelectItem;\n}\n\nconst CustomSelectItem = React.forwardRef<\n\tHTMLDivElement,\n\tSelect.SelectItemProps & { children: ReactNode }\n>(({ children, ...props }, forwardedRef) => {\n\treturn (\n\t\t<Select.Item className={item} {...props} ref={forwardedRef}>\n\t\t\t<Select.ItemText>{children}</Select.ItemText>\n\t\t\t<Select.ItemIndicator className={itemIndicator}>\n\t\t\t\t<CheckmarkIcon size=\"xs\" />\n\t\t\t</Select.ItemIndicator>\n\t\t</Select.Item>\n\t);\n});\n\nexport const CustomSelect: React.FC<CustomSelectProps> = ({\n\titems,\n\tonValueChange,\n\tdefaultValue,\n}) => {\n\treturn (\n\t\t<Select.Root\n\t\t\tonValueChange={onValueChange}\n\t\t\tdefaultValue={defaultValue?.value}\n\t\t>\n\t\t\t<Select.Trigger className={trigger}>\n\t\t\t\t<Select.Value />\n\t\t\t\t<Select.Icon>\n\t\t\t\t\t<ChevronDownIcon size=\"xs\" />\n\t\t\t\t</Select.Icon>\n\t\t\t</Select.Trigger>\n\n\t\t\t<Select.Portal>\n\t\t\t\t<Select.Content className={content}>\n\t\t\t\t\t<Select.Viewport>\n\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t<CustomSelectItem\n\t\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\t\tvalue={item.value}\n\t\t\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</CustomSelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Select.Viewport>\n\t\t\t\t</Select.Content>\n\t\t\t</Select.Portal>\n\t\t</Select.Root>\n\t);\n};\n","import 'src/react/ui/components/_internals/custom-select/styles.css.ts.vanilla.css?source=LnN0eWxlc19pdGVtX18xZGR0dWprMjpob3ZlciB7CiAgYmFja2dyb3VuZDogdmFyKC0tc2VxLWNvbG9ycy1iYWNrZ3JvdW5kLW11dGVkKTsKfQ==';\nexport var content = 'fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr11q0 fyvr11qg fyvr12g3 fyvr12ar fyvr1203 fyvr125f fyvr12hr fyvr12cf fyvr121r fyvr1273 fyvr11vx fyvr11r0 fyvr11rt';\nexport var item = 'styles_item__1ddtujk2 fyvr11h0 fyvr11ho fyvr11fo fyvr11gc fyvr1v4 fyvr1x8 fyvr1zs fyvr111g fyvr11ik fyvr12k9 fyvr11l8 fyvr11ow fyvr14g fyvr11m4 fyvr11rc fyvr12nf';\nexport var itemIndicator = 'fyvr11lw fyvr1qk fyvr11lk fyvr11ow fyvr11no';\nexport var trigger = 'fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw fyvr1zg fyvr111k fyvr11lk fyvr11ow fyvr11no fyvr11ik fyvr14g fyvr11cg fyvr11ur fyvr12k9 fyvr12nf fyvr12i9 fyvr11a4';","import { observable } from '@legendapp/state';\nimport type { FeeOption } from '../waasFeeOptionsSelect/WaasFeeOptionsSelect';\n\ntype WaasFeeOptionsModalState = {\n\tselectedFeeOption: FeeOption | undefined;\n};\n\nconst initialState = {\n\tselectedFeeOption: undefined,\n} as WaasFeeOptionsModalState;\n\nexport const waasFeeOptionsModal$ = observable(initialState);\n","import 'src/react/ui/modals/_internal/components/waasFeeOptionsBox/styles.css.ts.vanilla.css?source=LnN0eWxlc19mZWVPcHRpb25zV3JhcHBlcl9fMTI0aWswdzAgewogIGJvdHRvbTogLTE0MHB4Owp9Ci5zdHlsZXNfZGlhbG9nQ29udGVudF9fMTI0aWswdzIgewogIHRvcDogNTAlOwogIGxlZnQ6IDUwJTsKICB0cmFuc2Zvcm06IHRyYW5zbGF0ZSgtNTAlLCAtNTAlKTsKICBwYWRkaW5nOiAyNHB4Owp9Ci5zdHlsZXNfY3RhX18xMjRpazB3MyB7CiAgYm9yZGVyLXJhZGl1czogMTJweCAhaW1wb3J0YW50Owp9Ci5zdHlsZXNfY3RhX18xMjRpazB3MyA+IGRpdiB7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXIgIWltcG9ydGFudDsKfQ==';\nexport var cta = 'styles_cta__124ik0w3';\nexport var dialogContent = 'styles_dialogContent__124ik0w2 fyvr11hg fyvr11i4 fyvr11g4 fyvr11gs fyvr11l8 fyvr11ul fyvr11m0 fyvr11rv';\nexport var dialogOverlay = 'fyvr1m0 fyvr1o8 fyvr1qg fyvr1so fyvr11vl fyvr11m0 fyvr11rv';\nexport var feeOptionsWrapper = 'styles_feeOptionsWrapper__124ik0w0 fyvr11hg fyvr11i4 fyvr11g4 fyvr11gs fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11lw fyvr11w9 fyvr11r0 fyvr12g fyvr1qg fyvr11l8 fyvr11mc fyvr11cg';","import { type Observable, observable } from '@legendapp/state';\nimport type { ChainId } from '../../../../../_internal';\nimport type { Address } from 'viem';\n\nexport interface ActionModalState {\n\tisOpen: boolean;\n\tchainId: ChainId | null;\n\tcollectionAddress: Address | null;\n}\n\nexport function createActionModalStore() {\n\treturn observable<ActionModalState>({\n\t\tisOpen: false,\n\t\tchainId: null,\n\t\tcollectionAddress: null,\n\t});\n}\n\nexport function openModal(store: Observable<ActionModalState>) {\n\tstore.isOpen.set(true);\n}\n\nexport function closeModal(store: Observable<ActionModalState>) {\n\tstore.isOpen.set(false);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,gBAAqC;AAE9C;AAAA,EACC,OAAAA;AAAA,EACA,UAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAAC;AAAA,OACM;AACP,SAAS,YAAAC,iBAAgB;AACzB,SAAS,OAAO,WAAAC,UAAS,SAAS,UAAAC,SAAQ,QAAAC,aAAY;;;ACdtD;AAAA,EACC,OAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAAC;AAAA,EACA;AAAA,OACM;AACP,SAAS,yBAAyB;AAClC,SAAS,YAAAC,iBAAgB;AACzB,SAAS,aAAAC,kBAAiB;AAC1B,SAAmB,eAAAC,oBAAmB;AACtC,SAAS,kBAAkB;;;ACX3B,SAAS,gBAAgB;AACzB,SAAuB,UAAU,aAAa,mBAAmB;AAG1D,SAAS,mBAAmB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACD,GAIG;AACF,QAAM,eAAe,mBAAmB,OAAO;AAE/C,SAAO,SAAS;AAAA,IACf,UAAU,CAAC,WAAW,iBAAiB,SAAS,WAAW;AAAA,IAC3D,SAAS,YAAY;AACpB,UAAI,CAAC,YAAa,QAAO;AAEzB,UAAI,oBAAoB,aAAa;AACpC,cAAMC,WAAU,MAAM,aAAa,WAAW;AAAA,UAC7C,SAAS;AAAA,QACV,CAAC;AACD,eAAO;AAAA,UACN,OAAOA;AAAA,U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H,GACD;AAAA;AAAA;AAAA,QACD;AAAA,QAEA,gBAAAR;AAAA,UAAC;AAAA;AAAA,YACA;AAAA,YACA,oBAAoB,MAAM,mBAAmB,IAAI;AAAA,YACjD,sBAAsB,MAAM,mBAAmB,KAAK;AAAA;AAAA,QACrD;AAAA,QAEA,gBAAAA,KAAC,SAAM,WAAW,aAAa,SAAO,MAAC,SAAS,SAC/C,0BAAAA,KAAC,cAAW,MAAK,MAAK,cAAW,eAAc,MAAM,WAAW,GACjE;AAAA,SACD;AAAA,OACD,GACD;AAAA,EAEF;AACD;;;AQrHA,SAA0B,cAAAU,mBAAkB;AAUrC,SAAS,yBAAyB;AACxC,SAAOA,YAA6B;AAAA,IACnC,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,mBAAmB;AAAA,EACpB,CAAC;AACF;AAEO,SAAS,UAAU,OAAqC;AAC9D,QAAM,OAAO,IAAI,IAAI;AACtB;AAEO,SAAS,WAAW,OAAqC;AAC/D,QAAM,OAAO,IAAI,KAAK;AACvB;","names":["Box","Button","Text","observer","Content","Portal","Root","Box","Text","observer","useEffect","zeroAddress","balance","formatUnits","item","jsx","jsxs","formatUnits","jsx","jsxs","observer","zeroAddress","useEffect","Box","Text","jsx","jsxs","observer","Root","Portal","Content","Box","Text","cta","Button","observable"]}