@0xsequence/marketplace-sdk 0.5.6 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2J7JIOW5.js +2 -0
- package/dist/chunk-2J7JIOW5.js.map +1 -0
- package/dist/{chunk-Y75XGZOB.js → chunk-5O3ZAEEX.js} +4 -2
- package/dist/chunk-5O3ZAEEX.js.map +1 -0
- package/dist/{chunk-J6F5QOW5.js → chunk-6MYDUGVO.js} +28 -77
- package/dist/chunk-6MYDUGVO.js.map +1 -0
- package/dist/chunk-6WMO5YM5.js +94 -0
- package/dist/chunk-6WMO5YM5.js.map +1 -0
- package/dist/{chunk-AIGFG26L.js → chunk-A5ICXOCZ.js} +183 -250
- package/dist/chunk-A5ICXOCZ.js.map +1 -0
- package/dist/{chunk-4YR6AIXG.js → chunk-C42WHQRT.js} +6 -8
- package/dist/chunk-C42WHQRT.js.map +1 -0
- package/dist/{chunk-ZBLU3Q22.js → chunk-DLB2EQRX.js} +2 -2
- package/dist/{chunk-ZBLU3Q22.js.map → chunk-DLB2EQRX.js.map} +1 -1
- package/dist/{chunk-YOKGP2EQ.js → chunk-FG2BBP3P.js} +1 -1
- package/dist/{chunk-YOKGP2EQ.js.map → chunk-FG2BBP3P.js.map} +1 -1
- package/dist/{chunk-UZIAX32Y.js → chunk-GMWUIMX4.js} +10 -8
- package/dist/{chunk-UZIAX32Y.js.map → chunk-GMWUIMX4.js.map} +1 -1
- package/dist/{chunk-7C7ADZ2H.js → chunk-NKHM2AIS.js} +28 -44
- package/dist/chunk-NKHM2AIS.js.map +1 -0
- package/dist/{chunk-RIGIV5XT.js → chunk-NXORBVUS.js} +10 -4
- package/dist/chunk-NXORBVUS.js.map +1 -0
- package/dist/{chunk-7FN62HOP.js → chunk-UMYRZJVY.js} +11 -3
- package/dist/chunk-UMYRZJVY.js.map +1 -0
- package/dist/{chunk-E2V2BMF6.js → chunk-UZ3GJXBR.js} +2979 -3037
- package/dist/chunk-UZ3GJXBR.js.map +1 -0
- package/dist/{chunk-6YHHCGGY.js → chunk-VPJHNXZ2.js} +50 -74
- package/dist/chunk-VPJHNXZ2.js.map +1 -0
- package/dist/{create-config-CtFGrwXc.d.ts → create-config-CILyA_Hy.d.ts} +1 -1
- package/dist/index-BwDj_3at.d.ts +72 -0
- package/dist/index.css +12 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +175 -85
- package/dist/react/_internal/api/index.d.ts +2 -2
- package/dist/react/_internal/databeat/index.css.map +1 -1
- package/dist/react/_internal/databeat/index.js +9 -8
- package/dist/react/_internal/index.d.ts +5 -5
- package/dist/react/_internal/index.js +2 -2
- package/dist/react/_internal/wagmi/index.d.ts +2 -2
- package/dist/react/_internal/wagmi/index.js +1 -1
- package/dist/react/hooks/index.css.map +1 -1
- package/dist/react/hooks/index.d.ts +10 -79
- package/dist/react/hooks/index.js +10 -10
- package/dist/react/hooks/options/index.d.ts +8 -0
- package/dist/react/hooks/options/index.js +17 -0
- package/dist/react/hooks/options/index.js.map +1 -0
- package/dist/react/index.css +52 -35
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.d.ts +6 -5
- package/dist/react/index.js +19 -14
- package/dist/react/ssr/index.d.ts +1 -0
- package/dist/react/ssr/index.js +10 -2
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/collectible-card/index.css +52 -35
- package/dist/react/ui/components/collectible-card/index.css.map +1 -1
- package/dist/react/ui/components/collectible-card/index.d.ts +4 -3
- package/dist/react/ui/components/collectible-card/index.js +14 -12
- package/dist/react/ui/components/marketplace-logos/index.d.ts +1 -1
- package/dist/react/ui/components/marketplace-logos/index.js +1 -1
- package/dist/react/ui/icons/index.css.map +1 -1
- package/dist/react/ui/icons/index.js +1 -1
- package/dist/react/ui/index.css +52 -35
- package/dist/react/ui/index.css.map +1 -1
- package/dist/react/ui/index.d.ts +2 -2
- package/dist/react/ui/index.js +14 -12
- package/dist/react/ui/modals/_internal/components/actionModal/index.css +48 -48
- package/dist/react/ui/modals/_internal/components/actionModal/index.css.map +1 -1
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +9 -8
- package/dist/react/ui/styles/index.css.map +1 -1
- package/dist/{sdk-config-xWkdBdrL.d.ts → sdk-config-Bs3H_le_.d.ts} +1 -0
- package/dist/{services-Cled3TJr.d.ts → services-C3lzi1sL.d.ts} +1 -1
- package/dist/styles/index.css +12 -6
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/index.d.ts +3 -2
- package/dist/styles/index.js +3 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +2 -2
- package/dist/{types-C4oGsbnK.d.ts → types-CPl0DH-A.d.ts} +2 -2
- package/dist/utils/abi/index.js +5 -5
- package/dist/utils/index.d.ts +10 -9
- package/dist/utils/index.js +13 -11
- package/package.json +19 -15
- package/src/consts.ts +2 -0
- package/src/react/__tests__/provider.test.tsx +4 -4
- package/src/react/_internal/api/__mocks__/indexer.msw.ts +5 -5
- package/src/react/_internal/api/__mocks__/metadata.msw.ts +2 -2
- package/src/react/_internal/api/zod-schema.ts +2 -2
- package/src/react/_internal/databeat/index.ts +11 -3
- package/src/react/_internal/types.ts +2 -2
- package/src/react/_internal/wagmi/__tests__/create-config.test.ts +6 -6
- package/src/react/_internal/wagmi/create-config.ts +11 -2
- package/src/react/_internal/wallet/__tests__/wallet.test.ts +343 -0
- package/src/react/_internal/wallet/useWallet.ts +22 -15
- package/src/react/_internal/wallet/wallet.ts +17 -11
- package/src/react/hooks/__tests__/useAutoSelectFeeOption.test.tsx +8 -12
- package/src/react/hooks/__tests__/useBalanceOfCollectible.test.tsx +6 -13
- package/src/react/hooks/__tests__/useCancelOrder.test.tsx +59 -155
- package/src/react/hooks/__tests__/useCancelTransactionSteps.test.tsx +21 -20
- package/src/react/hooks/__tests__/useCollectible.test.tsx +6 -7
- package/src/react/hooks/__tests__/useCollection.test.tsx +5 -6
- package/src/react/hooks/__tests__/useCollectionBalanceDetails.test.tsx +8 -16
- package/src/react/hooks/__tests__/useCollectionDetails.test.tsx +7 -6
- package/src/react/hooks/__tests__/useCollectionDetailsPolling.test.tsx +8 -12
- package/src/react/hooks/__tests__/useComparePrices.test.tsx +1 -2
- package/src/react/hooks/__tests__/useConvertPriceToUSD.test.tsx +2 -3
- package/src/react/hooks/__tests__/useCountListingsForCollectible.test.tsx +4 -5
- package/src/react/hooks/__tests__/useCountOfCollectables.test.tsx +6 -7
- package/src/react/hooks/__tests__/useCountOffersForCollectible.test.tsx +4 -5
- package/src/react/hooks/__tests__/useCurrencies.test.tsx +3 -4
- package/src/react/hooks/__tests__/useCurrency.test.tsx +4 -6
- package/src/react/hooks/__tests__/useCurrencyBalance.test.tsx +78 -84
- package/src/react/hooks/__tests__/useFilters.test.tsx +5 -6
- package/src/react/hooks/__tests__/useFloorOrder.test.tsx +5 -6
- package/src/react/hooks/__tests__/useGenerateBuyTransaction.test.tsx +6 -7
- package/src/react/hooks/__tests__/useGenerateCancelTransaction.test.tsx +11 -67
- package/src/react/hooks/__tests__/useGenerateListingTransaction.test.tsx +6 -17
- package/src/react/hooks/__tests__/useGenerateOfferTransaction.test.tsx +6 -16
- package/src/react/hooks/__tests__/useGenerateSellTransaction.test.tsx +7 -17
- package/src/react/hooks/__tests__/useHighestOffer.test.tsx +6 -7
- package/src/react/hooks/__tests__/useListBalances.test.tsx +4 -9
- package/src/react/hooks/__tests__/useListCollectibleActivities.test.tsx +5 -11
- package/src/react/hooks/__tests__/useListCollectibles.test.tsx +6 -7
- package/src/react/hooks/__tests__/useListCollectiblesPaginated.test.tsx +2 -3
- package/src/react/hooks/__tests__/useListCollectionActivities.test.tsx +6 -12
- package/src/react/hooks/__tests__/useListCollections.test.tsx +5 -14
- package/src/react/hooks/__tests__/useListListingsForCollectible.test.tsx +6 -7
- package/src/react/hooks/__tests__/useListOffersForCollectible.test.tsx +6 -7
- package/src/react/hooks/__tests__/useLowestListing.test.tsx +6 -7
- package/src/react/hooks/__tests__/useMarketplaceConfig.test.tsx +5 -14
- package/src/react/hooks/__tests__/useRoyaltyPercentage.test.tsx +46 -78
- package/src/react/hooks/options/__mocks__/marketplaceConfig.msw.ts +9 -4
- package/src/react/hooks/options/__tests__/marketplaceConfigOptions.test.tsx +3 -4
- package/src/react/hooks/options/collectionOptions.ts +42 -0
- package/src/react/hooks/options/index.ts +2 -0
- package/src/react/hooks/useCancelOrder.tsx +3 -3
- package/src/react/hooks/useCancelTransactionSteps.tsx +11 -11
- package/src/react/hooks/useCollection.tsx +6 -37
- package/src/react/hooks/useCollectionBalanceDetails.tsx +3 -3
- package/src/react/hooks/useCollectionDetailsPolling.tsx +1 -1
- package/src/react/hooks/useCurrencies.tsx +1 -1
- package/src/react/hooks/useCurrencyBalance.tsx +4 -5
- package/src/react/hooks/useGenerateListingTransaction.tsx +1 -1
- package/src/react/hooks/useGenerateOfferTransaction.tsx +1 -1
- package/src/react/hooks/useGetReceiptFromHash.tsx +1 -1
- package/src/react/hooks/useListCollectibleActivities.tsx +1 -1
- package/src/react/hooks/useListCollectionActivities.tsx +1 -1
- package/src/react/hooks/useRoyaltyPercentage.tsx +16 -8
- package/src/react/index.ts +1 -0
- package/src/react/provider.tsx +2 -2
- package/src/react/ssr/__tests__/create-ssr-client.test.ts +97 -0
- package/src/react/ssr/create-ssr-client.ts +1 -1
- package/src/react/ui/components/_internals/action-button/ActionButton.tsx +3 -3
- package/src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx +2 -2
- package/src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx +4 -4
- package/src/react/ui/components/_internals/action-button/components/OwnerActions.tsx +2 -2
- package/src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts +1 -1
- package/src/react/ui/components/_internals/custom-select/__tests__/CustomSelect.test.tsx +2 -7
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +33 -7
- package/src/react/ui/components/collectible-card/Footer.tsx +47 -8
- package/src/react/ui/components/collectible-card/styles.css.ts +26 -2
- package/src/react/ui/components/marketplace-logos/marketplace-logos.tsx +1 -1
- package/src/react/ui/icons/index.ts +2 -5
- package/src/react/ui/{icons/DiamondEye.tsx → images/marketplaces/LooksRare.tsx} +1 -1
- package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx +10 -11
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useBuyCollectable.test.tsx +343 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +8 -31
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useFees.test.tsx +4 -4
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useLoadData.test.tsx +9 -36
- package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +3 -3
- package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +1 -1
- package/src/react/ui/modals/BuyModal/modals/Modal1155.tsx +25 -15
- package/src/react/ui/modals/BuyModal/modals/__tests__/CheckoutModal.test.tsx +2 -2
- package/src/react/ui/modals/BuyModal/modals/__tests__/Modal1155.test.tsx +209 -242
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +3 -2
- package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +5 -11
- package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +1 -1
- package/src/react/ui/modals/CreateListingModal/index.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +46 -49
- package/src/react/ui/modals/SellModal/Modal.tsx +1 -0
- package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +9 -28
- package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +2 -2
- package/src/react/ui/modals/SuccessfulPurchaseModal/__tests__/Modal.test.tsx +3 -3
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +4 -4
- package/src/react/ui/modals/_internal/components/actionModal/store.ts +1 -1
- package/src/react/ui/modals/_internal/components/alertMessage/index.tsx +2 -3
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +4 -4
- package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/priceInput/__tests__/index.test.tsx +1 -8
- package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +9 -5
- package/src/react/ui/modals/_internal/components/switchChainModal/__tests__/SwitchChainModal.test.tsx +4 -10
- package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +2 -2
- package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +1 -1
- package/src/react/ui/modals/_internal/components/transaction-footer/index.tsx +9 -3
- package/src/react/ui/modals/_internal/components/transaction-footer/transactionFooter.css.ts +11 -0
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +8 -7
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +4 -9
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +3 -3
- package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +4 -4
- package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +1 -1
- package/src/react/ui/modals/modal-provider.tsx +2 -2
- package/src/types/sdk-config.ts +1 -0
- package/src/utils/__tests__/address.test.ts +1 -1
- package/src/utils/__tests__/getMarketplaceDetails.test.ts +4 -4
- package/src/utils/getMarketplaceDetails.ts +7 -7
- package/src/utils/index.ts +1 -1
- package/src/utils/networkconfigToWagmiChain.ts +17 -0
- package/src/utils/price.ts +8 -0
- package/test/const.ts +35 -0
- package/test/globalSetup.ts +15 -0
- package/test/index.ts +1 -0
- package/{src/react/_internal/test → test}/mocks/wallet.ts +5 -5
- package/test/setup.ts +20 -0
- package/test/test-utils.tsx +157 -0
- package/tsconfig.json +7 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.js +5 -3
- package/dist/chunk-4YR6AIXG.js.map +0 -1
- package/dist/chunk-6YHHCGGY.js.map +0 -1
- package/dist/chunk-7C7ADZ2H.js.map +0 -1
- package/dist/chunk-7FN62HOP.js.map +0 -1
- package/dist/chunk-AIGFG26L.js.map +0 -1
- package/dist/chunk-E2V2BMF6.js.map +0 -1
- package/dist/chunk-J6F5QOW5.js.map +0 -1
- package/dist/chunk-RIGIV5XT.js.map +0 -1
- package/dist/chunk-Y75XGZOB.js.map +0 -1
- package/src/react/_internal/test/mocks/publicClient.ts +0 -39
- package/src/react/_internal/test/mocks/wagmi.ts +0 -61
- package/src/react/_internal/test/setup.ts +0 -28
- package/src/react/_internal/test-utils.tsx +0 -97
- package/src/react/ui/icons/ArrowUp.tsx +0 -32
- package/src/react/ui/icons/InventoryIcon.tsx +0 -44
- package/src/react/ui/icons/MinusIcon.tsx +0 -34
- package/src/react/ui/icons/PlusIcon.tsx +0 -32
- package/src/react/ui/icons/PositiveCircleIcon.tsx +0 -38
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useBuyCollectable.test.tsx.bak +0 -379
- package/src/utils/__tests__/get-public-rpc-client.test.ts +0 -111
- package/src/utils/get-public-rpc-client.ts +0 -41
- /package/src/react/ui/icons/{Bell.tsx → BellIcon.tsx} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/address.ts","../src/utils/get-public-rpc-client.ts","../src/utils/_internal/error/base.ts","../src/utils/_internal/error/transaction.ts","../src/utils/network.ts","../src/utils/price.ts","../src/react/ui/components/marketplace-logos/marketplace-logos.tsx","../src/utils/getMarketplaceDetails.ts"],"sourcesContent":["export const truncateMiddle = (\n\taddress: string,\n\tminPrefix = 20,\n\tminSuffix = 3,\n): string => {\n\tif (minPrefix + minSuffix >= 40) {\n\t\treturn address;\n\t}\n\treturn `${address.substring(0, 2 + minPrefix)}…${address.substring(address.length - minSuffix)}`;\n};\n\nexport const truncateEnd = (text: string | undefined, truncateAt: number) => {\n\tif (!text) return '';\n\n\tlet finalText = text;\n\n\tif (text.length >= truncateAt) {\n\t\tfinalText = `${text.slice(0, truncateAt)}...`;\n\t}\n\n\treturn finalText;\n};\n\nexport const compareAddress = (a = '', b = '') => {\n\treturn a.toLowerCase() === b.toLowerCase();\n};\n","import { allNetworks, findNetworkConfig } from '@0xsequence/network';\nimport { http, type PublicClient, createPublicClient } from 'viem';\nimport type { ChainId } from '../react/_internal';\nimport { MissingConfigError } from './_internal/error/transaction';\n\nexport const getPublicRpcClient = (chainId: ChainId): PublicClient => {\n\tif (chainId === undefined) {\n\t\tthrow new MissingConfigError(\n\t\t\t`Network configuration for chainId: ${chainId}`,\n\t\t);\n\t}\n\n\tconst network = findNetworkConfig(allNetworks, chainId);\n\n\tif (!network) {\n\t\tthrow new MissingConfigError(\n\t\t\t`Network configuration for chainId: ${chainId}`,\n\t\t);\n\t}\n\n\treturn createPublicClient({\n\t\tchain: {\n\t\t\t...network,\n\t\t\tid: Number(chainId),\n\t\t\tname: network.name,\n\t\t\tnativeCurrency: { ...network.nativeToken },\n\t\t\trpcUrls: {\n\t\t\t\tdefault: {\n\t\t\t\t\thttp: [network.rpcUrl],\n\t\t\t\t},\n\t\t\t\tpublic: {\n\t\t\t\t\thttp: [network.rpcUrl],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tbatch: {\n\t\t\tmulticall: true,\n\t\t},\n\t\ttransport: http(),\n\t});\n};\n","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 ChainSwitchUserRejectedError extends TransactionError {\n\toverride name = 'ChainSwitchUserRejectedError';\n\tconstructor() {\n\t\tsuper('User rejected chain switch', {\n\t\t\tdetails: 'The user rejected the chain switch request.',\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 class WalletInstanceNotFoundError extends TransactionError {\n\toverride name = 'WalletInstanceNotFoundError';\n\tconstructor() {\n\t\tsuper('Wallet instance not found', {\n\t\t\tdetails: 'The wallet instance is undefined',\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| ChainSwitchUserRejectedError\n\t| ChainSwitchError\n\t| TransactionSignatureError\n\t| TransactionExecutionError\n\t| NoWalletConnectedError\n\t| TransactionError\n\t| WalletInstanceNotFoundError;\n","import { networks, type ChainId as sequenceChainId } from '@0xsequence/network';\nimport type { ChainId } from '../react/_internal';\n\nexport const getPresentableChainName = (chainId: ChainId) => {\n\tconst id = Number(chainId) as sequenceChainId;\n\treturn networks[id]?.name;\n};\n","import { formatUnits } from 'viem';\n\ntype CalculatePriceDifferencePercentageArgs = {\n\tinputPriceRaw: bigint;\n\tbasePriceRaw: bigint;\n\tdecimals: number;\n};\n\nexport const calculatePriceDifferencePercentage = ({\n\tinputPriceRaw,\n\tbasePriceRaw,\n\tdecimals,\n}: CalculatePriceDifferencePercentageArgs) => {\n\tconst inputPrice = Number(formatUnits(inputPriceRaw, decimals));\n\tconst basePrice = Number(formatUnits(basePriceRaw, decimals));\n\tconst difference = inputPrice - basePrice;\n\tconst percentageDifference = (difference / basePrice) * 100;\n\n\treturn percentageDifference.toFixed(2);\n};\n","import { type ComponentProps, lazy, Suspense } from 'react';\nimport { Image } from '@0xsequence/design-system';\n\n/* @__PURE__ */\nconst createMarketplaceLogo = (\n\timportFn: () => Promise<{ default: string }>,\n\talt: string,\n) => {\n\tconst LazyLogo = lazy(async () => {\n\t\tconst src = await importFn();\n\t\treturn {\n\t\t\tdefault: function MarketplaceLogo({\n\t\t\t\talt: altProp,\n\t\t\t\t...props\n\t\t\t}: ComponentProps<typeof Image>) {\n\t\t\t\treturn <Image src={src.default} alt={altProp || alt} {...props} />;\n\t\t\t},\n\t\t};\n\t});\n\n\treturn function MarketplaceLogo(props: ComponentProps<typeof Image>) {\n\t\treturn (\n\t\t\t<Suspense\n\t\t\t\tfallback={<div style={{ width: props.width, height: props.height }} />}\n\t\t\t>\n\t\t\t\t<LazyLogo {...props} />\n\t\t\t</Suspense>\n\t\t);\n\t};\n};\n\nexport const AlienSwapLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/alien_swap.png'),\n\t'AlienSwap Logo',\n);\nexport const AquaXyzLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/aqua-xyz.png'),\n\t'AquaXyz Logo',\n);\nexport const AuraLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/aura.png'),\n\t'Aura Logo',\n);\nexport const BlurLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/blur.png'),\n\t'Blur Logo',\n);\nexport const CoinbaseLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/coinbase.png'),\n\t'Coinbase Logo',\n);\nexport const ElementLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/element.png'),\n\t'Element Logo',\n);\nexport const FoundationLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/foundation.png'),\n\t'Foundation Logo',\n);\nexport const LooksRareLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/looks-rare.png'),\n\t'LooksRare Logo',\n);\nexport const MagicEdenLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/magic-eden.png'),\n\t'MagicEden Logo',\n);\nexport const ManifoldLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/manifold.png'),\n\t'Manifold Logo',\n);\nexport const MintifyLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/mintify.png'),\n\t'Mintify Logo',\n);\nexport const NftxLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/nftx.png'),\n\t'NFTX Logo',\n);\nexport const OkxLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/okx.png'),\n\t'OKX Logo',\n);\nexport const OpenSeaLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/open-sea.png'),\n\t'OpenSea Logo',\n);\nexport const RaribleLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/rarible.png'),\n\t'Rarible Logo',\n);\nexport const SequenceLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/sequence.png'),\n\t'Sequence Logo',\n);\nexport const SudoSwapLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/sudo-swap.png'),\n\t'SudoSwap Logo',\n);\nexport const SuperRareLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/super-rare.png'),\n\t'SuperRare Logo',\n);\nexport const X2y2Logo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/x2y2.png'),\n\t'X2Y2 Logo',\n);\nexport const ZoraLogo = createMarketplaceLogo(\n\t() => import('../../images/marketplaces/zora.png'),\n\t'Zora Logo',\n);\n","import { MarketplaceKind } from '../types';\nimport type { ComponentType } from 'react';\nimport type { Image } from '@0xsequence/design-system';\nimport {\n\tSequenceLogo,\n\tOpenSeaLogo,\n\tMagicEdenLogo,\n\tMintifyLogo,\n\tLooksRareLogo,\n\tX2y2Logo,\n\tBlurLogo,\n\tAlienSwapLogo,\n} from '../react/ui/components/marketplace-logos';\n\ninterface Marketplace {\n\tlogo: ComponentType<React.ComponentProps<typeof Image>>;\n\tdisplayName: string;\n}\n\nconst MARKETPLACES: Record<string, Marketplace> = {\n\tsequence: {\n\t\tlogo: SequenceLogo,\n\t\tdisplayName: 'Sequence',\n\t},\n\topensea: {\n\t\tlogo: OpenSeaLogo,\n\t\tdisplayName: 'OpenSea',\n\t},\n\tmagiceden: {\n\t\tlogo: MagicEdenLogo,\n\t\tdisplayName: 'Magic Eden',\n\t},\n\tmintify: {\n\t\tlogo: MintifyLogo,\n\t\tdisplayName: 'Mintify',\n\t},\n\tlooksrare: {\n\t\tlogo: LooksRareLogo,\n\t\tdisplayName: 'Looks Rare',\n\t},\n\tx2y2: {\n\t\tlogo: X2y2Logo,\n\t\tdisplayName: 'X2Y2',\n\t},\n\tblur: {\n\t\tlogo: BlurLogo,\n\t\tdisplayName: 'Blur',\n\t},\n\talienswap: {\n\t\tlogo: AlienSwapLogo,\n\t\tdisplayName: 'AlienSwap',\n\t},\n} as const;\n\nconst KIND_TO_MARKETPLACE: Partial<\n\tRecord<MarketplaceKind, keyof typeof MARKETPLACES>\n> = {\n\t[MarketplaceKind.sequence_marketplace_v1]: 'sequence',\n\t[MarketplaceKind.sequence_marketplace_v2]: 'sequence',\n\t[MarketplaceKind.opensea]: 'opensea',\n\t[MarketplaceKind.mintify]: 'mintify',\n\t[MarketplaceKind.looks_rare]: 'looksrare',\n\t[MarketplaceKind.x2y2]: 'x2y2',\n\t[MarketplaceKind.blur]: 'blur',\n};\n\ntype MarketplaceDetailsProp = {\n\toriginName: string;\n\tkind: MarketplaceKind;\n};\n\n// TODO: add suport for more marketplaces and improve detection of marketplace\nexport function getMarketplaceDetails({\n\toriginName,\n\tkind,\n}: MarketplaceDetailsProp) {\n\tif (\n\t\tkind === MarketplaceKind.sequence_marketplace_v1 ||\n\t\tkind === MarketplaceKind.sequence_marketplace_v2\n\t) {\n\t\treturn MARKETPLACES.sequence;\n\t}\n\n\tlet name = originName.toLowerCase();\n\n\ttry {\n\t\t//Check if the name can be parsed as a url\n\t\tnew URL(name);\n\t\t// if it can we are naively trying to extract the root domain\n\t\tname = getRootDomain(name) || name;\n\t} catch {}\n\n\tname = name.replace(/ /g, '');\n\n\tconst details = MARKETPLACES[name];\n\n\tif (details) {\n\t\treturn details;\n\t}\n\n\tif (KIND_TO_MARKETPLACE[kind]) {\n\t\treturn MARKETPLACES[KIND_TO_MARKETPLACE[kind]];\n\t}\n}\n\nfunction getRootDomain(url: string) {\n\tconst domain = url.replace(/^(https?:\\/\\/)?(www\\.)?/, '');\n\tconst parts = domain.split('.');\n\treturn parts[parts.length - 2] || parts[0];\n}\n"],"mappings":";AAAO,IAAM,iBAAiB,CAC7B,SACA,YAAY,IACZ,YAAY,MACA;AACZ,MAAI,YAAY,aAAa,IAAI;AAChC,WAAO;AAAA,EACR;AACA,SAAO,GAAG,QAAQ,UAAU,GAAG,IAAI,SAAS,CAAC,SAAI,QAAQ,UAAU,QAAQ,SAAS,SAAS,CAAC;AAC/F;AAEO,IAAM,cAAc,CAAC,MAA0B,eAAuB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,YAAY;AAEhB,MAAI,KAAK,UAAU,YAAY;AAC9B,gBAAY,GAAG,KAAK,MAAM,GAAG,UAAU,CAAC;AAAA,EACzC;AAEA,SAAO;AACR;AAEO,IAAM,iBAAiB,CAAC,IAAI,IAAI,IAAI,OAAO;AACjD,SAAO,EAAE,YAAY,MAAM,EAAE,YAAY;AAC1C;;;ACzBA,SAAS,aAAa,yBAAyB;AAC/C,SAAS,MAAyB,0BAA0B;;;ACOrD,IAAM,YAAN,cAAwB,MAAM;AAAA,EACpC;AAAA,EACA;AAAA,EA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AC9B,SAAO,MAAM,MAAM,SAAS,CAAC,KAAK,MAAM,CAAC;AAC1C;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/_internal/databeat/index.ts"],"sourcesContent":["import type { Event as DatabeatEvent } from '@databeat/tracker';\nimport { Databeat } from '@databeat/tracker';\n\nimport { useConfig } from '../../hooks';\nimport type {\n\tEventType,\n\tTrackCreateListing,\n\tTrackCreateOffer,\n\tTrackSellItems,\n\tTrackTransactionFailed,\n} from './types';\n\nexport type EventTypes = keyof typeof EventType;\nexport type Event = DatabeatEvent<EventTypes>;\n\nexport class DatabeatAnalytics extends Databeat<Extract<EventTypes, string>> {\n\t// Currently handled by kit-checkout\n\t// trackBuyItems(args: TrackBuyItems) {\n\t// this.track({\n\t// event: 'BUY_ITEMS',\n\t// props: args.props,\n\t// nums: args.nums\n\t// })\n\t// }\n\n\ttrackSellItems(args: TrackSellItems) {\n\t\tthis.track({\n\t\t\tevent: 'SELL_ITEMS',\n\t\t\tprops: args.props,\n\t\t\tnums: args.nums,\n\t\t});\n\t}\n\n\ttrackCreateListing(args: TrackCreateListing) {\n\t\tthis.track({\n\t\t\tevent: 'CREATE_LISTING',\n\t\t\tprops: args.props,\n\t\t\tnums: args.nums,\n\t\t});\n\t}\n\n\ttrackCreateOffer(args: TrackCreateOffer) {\n\t\tthis.track({\n\t\t\tevent: 'CREATE_OFFER',\n\t\t\tprops: args.props,\n\t\t\tnums: args.nums,\n\t\t});\n\t}\n\n\ttrackTransactionFailed(args: TrackTransactionFailed) {\n\t\tthis.track({\n\t\t\tevent: 'TRANSACTION_FAILED',\n\t\t\tprops: args,\n\t\t});\n\t}\n}\n\nexport const useAnalytics = () => {\n\tconst config = useConfig();\n\treturn new DatabeatAnalytics('https://databeat.sequence.app', {\n\t\tjwt: config.projectAccessKey,\n\t});\n};\n"],"mappings":";;;;;;AACA,SAAS,gBAAgB;AAclB,IAAM,oBAAN,cAAgC,SAAsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAU5E,eAAe,MAAsB;AACpC,SAAK,MAAM;AAAA,MACV,OAAO;AAAA,MACP,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,IACZ,CAAC;AAAA,EACF;AAAA,EAEA,mBAAmB,MAA0B;AAC5C,SAAK,MAAM;AAAA,MACV,OAAO;AAAA,MACP,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,IACZ,CAAC;AAAA,EACF;AAAA,EAEA,iBAAiB,MAAwB;AACxC,SAAK,MAAM;AAAA,MACV,OAAO;AAAA,MACP,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,IACZ,CAAC;AAAA,EACF;AAAA,EAEA,uBAAuB,MAA8B;AACpD,SAAK,MAAM;AAAA,MACV,OAAO;AAAA,MACP,OAAO;AAAA,IACR,CAAC;AAAA,EACF;AACD;AAEO,IAAM,eAAe,MAAM;AACjC,QAAM,SAAS,UAAU;AACzB,SAAO,IAAI,kBAAkB,iCAAiC;AAAA,IAC7D,KAAK,OAAO;AAAA,EACb,CAAC;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/consts.ts"],"sourcesContent":["export const SEQUENCE_MARKET_V1_ADDRESS =\n\t'0xB537a160472183f2150d42EB1c3DD6684A55f74c';\n\nexport const SEQUENCE_MARKET_V2_ADDRESS =\n\t'0xfdb42A198a932C8D3B506Ffa5e855bC4b348a712';\n"],"mappings":";;;AAAO,IAAM,6BACZ;AAEM,IAAM,6BACZ;","names":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
2
|
-
import type { PublicClient } from 'viem';
|
|
3
|
-
|
|
4
|
-
export type MockPublicClient = PublicClient;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Common mock implementations for public client functions
|
|
8
|
-
*/
|
|
9
|
-
export const commonPublicClientMocks = {
|
|
10
|
-
getBalance: vi.fn().mockResolvedValue(BigInt('1000000000000000000')), // 1 ETH
|
|
11
|
-
readContract: vi.fn().mockImplementation(async ({ functionName }) => {
|
|
12
|
-
if (functionName === 'balanceOf') {
|
|
13
|
-
return BigInt('1000000000000000000'); // 1 Token
|
|
14
|
-
}
|
|
15
|
-
if (functionName === 'decimals') {
|
|
16
|
-
return 18;
|
|
17
|
-
}
|
|
18
|
-
return BigInt(0);
|
|
19
|
-
}),
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Creates a mock public client with pre-configured mock functions for testing
|
|
24
|
-
* @param overrides - Optional overrides for the default mock implementations
|
|
25
|
-
* @returns A mock public client instance with vitest mock functions
|
|
26
|
-
*/
|
|
27
|
-
export function createMockPublicClient(
|
|
28
|
-
overrides?: Partial<MockPublicClient>,
|
|
29
|
-
): MockPublicClient {
|
|
30
|
-
const defaultMockPublicClient = {
|
|
31
|
-
getBalance: commonPublicClientMocks.getBalance,
|
|
32
|
-
readContract: commonPublicClientMocks.readContract,
|
|
33
|
-
} as unknown as PublicClient;
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
...defaultMockPublicClient,
|
|
37
|
-
...overrides,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
2
|
-
import type { Config } from 'wagmi';
|
|
3
|
-
import type { ReactNode } from 'react';
|
|
4
|
-
import { zeroAddress } from 'viem';
|
|
5
|
-
|
|
6
|
-
export type MockWagmiConfig = Config;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Common mock implementations for wagmi hooks and functions
|
|
10
|
-
*/
|
|
11
|
-
export const commonWagmiMocks = {
|
|
12
|
-
useAccount: vi.fn().mockReturnValue({
|
|
13
|
-
address: zeroAddress,
|
|
14
|
-
isConnecting: false,
|
|
15
|
-
isDisconnected: false,
|
|
16
|
-
isReconnecting: false,
|
|
17
|
-
status: 'connected',
|
|
18
|
-
}),
|
|
19
|
-
createConfig: vi.fn().mockReturnValue({
|
|
20
|
-
chains: [],
|
|
21
|
-
connectors: [],
|
|
22
|
-
transports: {},
|
|
23
|
-
}),
|
|
24
|
-
http: vi.fn().mockReturnValue({}),
|
|
25
|
-
WagmiProvider: vi
|
|
26
|
-
.fn()
|
|
27
|
-
.mockImplementation(({ children }: { children: ReactNode }) => children),
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Creates mock wagmi hooks and functions with pre-configured implementations for testing
|
|
32
|
-
* @param overrides - Optional overrides for the default mock implementations
|
|
33
|
-
* @returns Mock wagmi hooks and functions with vitest mock functions
|
|
34
|
-
*/
|
|
35
|
-
export function createMockWagmi(overrides?: Partial<typeof commonWagmiMocks>) {
|
|
36
|
-
return {
|
|
37
|
-
...commonWagmiMocks,
|
|
38
|
-
...overrides,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Mock chain data for testing
|
|
44
|
-
*/
|
|
45
|
-
export const mockChains = {
|
|
46
|
-
mainnet: { id: 1, name: 'Ethereum', network: 'mainnet' },
|
|
47
|
-
sepolia: { id: 11155111, name: 'Sepolia', network: 'sepolia' },
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Mock connector data for testing
|
|
52
|
-
*/
|
|
53
|
-
export const mockConnectors = {
|
|
54
|
-
mock: () => ({
|
|
55
|
-
accounts: [
|
|
56
|
-
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
|
|
57
|
-
'0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
58
|
-
'0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
|
|
59
|
-
],
|
|
60
|
-
}),
|
|
61
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { afterAll, afterEach, beforeAll } from 'vitest';
|
|
2
|
-
import { cleanup } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom/vitest';
|
|
4
|
-
import { setupServer } from 'msw/node';
|
|
5
|
-
import { handlers as marketplaceHandlers } from '../api/__mocks__/marketplace.msw';
|
|
6
|
-
import { handlers as metadataHandlers } from '../api/__mocks__/metadata.msw';
|
|
7
|
-
import { handlers as indexerHandlers } from '../api/__mocks__/indexer.msw';
|
|
8
|
-
import { handlers as marketplaceConfigHandlers } from '../../hooks/options/__mocks__/marketplaceConfig.msw';
|
|
9
|
-
|
|
10
|
-
export const server = setupServer(
|
|
11
|
-
...marketplaceHandlers,
|
|
12
|
-
...metadataHandlers,
|
|
13
|
-
...indexerHandlers,
|
|
14
|
-
...marketplaceConfigHandlers,
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
beforeAll(() => {
|
|
18
|
-
server.listen();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
afterEach(() => {
|
|
22
|
-
cleanup();
|
|
23
|
-
server.resetHandlers();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
afterAll(() => {
|
|
27
|
-
server.close();
|
|
28
|
-
});
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
2
|
-
import { renderHook, render as rtlRender } from '@testing-library/react';
|
|
3
|
-
import type { RenderOptions } from '@testing-library/react';
|
|
4
|
-
import type { ReactElement } from 'react';
|
|
5
|
-
import { type Config, createConfig, http, WagmiProvider } from 'wagmi';
|
|
6
|
-
import { mainnet, sepolia } from 'wagmi/chains';
|
|
7
|
-
import { mock } from 'wagmi/connectors';
|
|
8
|
-
|
|
9
|
-
// https://github.com/jsdom/jsdom/issues/1695
|
|
10
|
-
window.HTMLElement.prototype.scrollIntoView = () => {};
|
|
11
|
-
|
|
12
|
-
const createTestQueryClient = () =>
|
|
13
|
-
new QueryClient({
|
|
14
|
-
defaultOptions: {
|
|
15
|
-
queries: {
|
|
16
|
-
retry: false,
|
|
17
|
-
staleTime: 0,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const config = createConfig({
|
|
23
|
-
chains: [mainnet, sepolia],
|
|
24
|
-
connectors: [
|
|
25
|
-
mock({
|
|
26
|
-
accounts: [
|
|
27
|
-
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
|
|
28
|
-
'0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
29
|
-
'0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
|
|
30
|
-
],
|
|
31
|
-
// TODO: Enable this once it works, so we won't have to manually connect the wallet in the tests.
|
|
32
|
-
// features: {
|
|
33
|
-
// defaultConnected: true,
|
|
34
|
-
// },
|
|
35
|
-
}),
|
|
36
|
-
],
|
|
37
|
-
transports: {
|
|
38
|
-
[mainnet.id]: http(),
|
|
39
|
-
[sepolia.id]: http(),
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export function renderWithClient(
|
|
44
|
-
ui: ReactElement,
|
|
45
|
-
options?: Omit<RenderOptions, 'wrapper'>,
|
|
46
|
-
) {
|
|
47
|
-
const testQueryClient = createTestQueryClient();
|
|
48
|
-
|
|
49
|
-
const { rerender, ...result } = rtlRender(ui, {
|
|
50
|
-
wrapper: ({ children }) => (
|
|
51
|
-
<WagmiProvider config={config}>
|
|
52
|
-
<QueryClientProvider client={testQueryClient}>
|
|
53
|
-
{children}
|
|
54
|
-
</QueryClientProvider>
|
|
55
|
-
</WagmiProvider>
|
|
56
|
-
),
|
|
57
|
-
...options,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
...result,
|
|
62
|
-
rerender: (rerenderUi: ReactElement) =>
|
|
63
|
-
rerender(
|
|
64
|
-
<WagmiProvider config={config}>
|
|
65
|
-
<QueryClientProvider client={testQueryClient}>
|
|
66
|
-
{rerenderUi}
|
|
67
|
-
</QueryClientProvider>
|
|
68
|
-
</WagmiProvider>,
|
|
69
|
-
),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function renderHookWithClient<P, R>(
|
|
74
|
-
callback: (props: P) => R,
|
|
75
|
-
options?: Omit<RenderOptions, 'queries'>,
|
|
76
|
-
wagmiConfig?: Config,
|
|
77
|
-
) {
|
|
78
|
-
const testQueryClient = createTestQueryClient();
|
|
79
|
-
|
|
80
|
-
return renderHook(callback, {
|
|
81
|
-
wrapper: ({ children }) => {
|
|
82
|
-
return (
|
|
83
|
-
<WagmiProvider config={wagmiConfig ?? config}>
|
|
84
|
-
<QueryClientProvider client={testQueryClient}>
|
|
85
|
-
{children}
|
|
86
|
-
</QueryClientProvider>
|
|
87
|
-
</WagmiProvider>
|
|
88
|
-
);
|
|
89
|
-
},
|
|
90
|
-
...options,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export * from '@testing-library/react';
|
|
95
|
-
|
|
96
|
-
export { renderWithClient as render };
|
|
97
|
-
export { renderHookWithClient as renderHook };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Box, type IconProps } from '@0xsequence/design-system';
|
|
2
|
-
import { iconVariants } from './styles.css';
|
|
3
|
-
|
|
4
|
-
const Svg = () => (
|
|
5
|
-
<svg
|
|
6
|
-
width="12"
|
|
7
|
-
height="12"
|
|
8
|
-
viewBox="0 0 12 12"
|
|
9
|
-
fill="none"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
role="img"
|
|
12
|
-
aria-label="Arrow up"
|
|
13
|
-
>
|
|
14
|
-
<title>Arrow up icon</title>
|
|
15
|
-
<path
|
|
16
|
-
d="M8.65039 6.03638L9.28679 5.39999L5.96859 2.08179L2.65039 5.39999L3.28679 6.03638L5.51859 3.80458V9.91822H6.41859V3.80458L8.65039 6.03638Z"
|
|
17
|
-
fill="#D1D1D1"
|
|
18
|
-
/>
|
|
19
|
-
</svg>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const SvgArrowUpIcon = ({ size = 'sm', ...props }: IconProps) => (
|
|
23
|
-
<Box
|
|
24
|
-
as={Svg}
|
|
25
|
-
className={iconVariants({
|
|
26
|
-
size,
|
|
27
|
-
})}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export default SvgArrowUpIcon;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Box, type IconProps } from '@0xsequence/design-system';
|
|
2
|
-
import { iconVariants } from './styles.css';
|
|
3
|
-
|
|
4
|
-
const Svg = () => (
|
|
5
|
-
<svg
|
|
6
|
-
width="20"
|
|
7
|
-
height="20"
|
|
8
|
-
viewBox="0 0 20 20"
|
|
9
|
-
fill="none"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
role="img"
|
|
12
|
-
aria-label="Inventory"
|
|
13
|
-
>
|
|
14
|
-
<title>Inventory icon</title>
|
|
15
|
-
<path
|
|
16
|
-
d="M2 4C2 2.89543 2.85961 2 3.92 2H6.48C7.54039 2 8.4 2.89543 8.4 4V6.66667C8.4 7.77124 7.54039 8.66667 6.48 8.66667H3.92C2.85961 8.66667 2 7.77124 2 6.66667V4Z"
|
|
17
|
-
fill="white"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
d="M11.6 4C11.6 2.89543 12.4596 2 13.52 2H16.08C17.1404 2 18 2.89543 18 4V6.66667C18 7.77124 17.1404 8.66667 16.08 8.66667H13.52C12.4596 8.66667 11.6 7.77124 11.6 6.66667V4Z"
|
|
21
|
-
fill="white"
|
|
22
|
-
/>
|
|
23
|
-
<path
|
|
24
|
-
d="M2 13.3333C2 12.2288 2.85961 11.3333 3.92 11.3333H6.48C7.54039 11.3333 8.4 12.2288 8.4 13.3333V16C8.4 17.1046 7.54039 18 6.48 18H3.92C2.85961 18 2 17.1046 2 16V13.3333Z"
|
|
25
|
-
fill="white"
|
|
26
|
-
/>
|
|
27
|
-
<path
|
|
28
|
-
d="M11.6 13.3333C11.6 12.2288 12.4596 11.3333 13.52 11.3333H16.08C17.1404 11.3333 18 12.2288 18 13.3333V16C18 17.1046 17.1404 18 16.08 18H13.52C12.4596 18 11.6 17.1046 11.6 16V13.3333Z"
|
|
29
|
-
fill="white"
|
|
30
|
-
/>
|
|
31
|
-
</svg>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const SvgInventoryIcon = ({ size = 'sm', ...props }: IconProps) => (
|
|
35
|
-
<Box
|
|
36
|
-
as={Svg}
|
|
37
|
-
className={iconVariants({
|
|
38
|
-
size,
|
|
39
|
-
})}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
export default SvgInventoryIcon;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Box, type IconProps } from '@0xsequence/design-system';
|
|
2
|
-
import { iconVariants } from './styles.css';
|
|
3
|
-
|
|
4
|
-
const Svg = () => (
|
|
5
|
-
<svg
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
viewBox="0 0 16 16"
|
|
9
|
-
fill="none"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
role="img"
|
|
12
|
-
aria-labelledby="minus-title"
|
|
13
|
-
>
|
|
14
|
-
<title id="minus-title">Minus Icon</title>
|
|
15
|
-
<path
|
|
16
|
-
fillRule="evenodd"
|
|
17
|
-
clipRule="evenodd"
|
|
18
|
-
d="M13.2303 8.60039L3.4375 8.60039L3.4375 7.40039L13.2303 7.40039V8.60039Z"
|
|
19
|
-
fill="white"
|
|
20
|
-
/>
|
|
21
|
-
</svg>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const SvgMinusIcon = ({ size = 'sm', ...props }: IconProps) => (
|
|
25
|
-
<Box
|
|
26
|
-
as={Svg}
|
|
27
|
-
className={iconVariants({
|
|
28
|
-
size,
|
|
29
|
-
})}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export default SvgMinusIcon;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Box, type IconProps } from '@0xsequence/design-system';
|
|
2
|
-
import { iconVariants } from './styles.css';
|
|
3
|
-
|
|
4
|
-
const Svg = () => (
|
|
5
|
-
<svg
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
viewBox="0 0 16 16"
|
|
9
|
-
fill="none"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
role="img"
|
|
12
|
-
aria-labelledby="plus-title"
|
|
13
|
-
>
|
|
14
|
-
<title id="plus-title">Plus Icon</title>
|
|
15
|
-
<path
|
|
16
|
-
d="M8.65529 7.45725V2.40039H7.45529V7.45724H2.39844V8.65725H7.45529V13.7141H8.65529V8.65725H13.7121V7.45725H8.65529Z"
|
|
17
|
-
fill="white"
|
|
18
|
-
/>
|
|
19
|
-
</svg>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const SvgPlusIcon = ({ size = 'sm', ...props }: IconProps) => (
|
|
23
|
-
<Box
|
|
24
|
-
as={Svg}
|
|
25
|
-
className={iconVariants({
|
|
26
|
-
size,
|
|
27
|
-
})}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export default SvgPlusIcon;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Box, type IconProps } from '@0xsequence/design-system';
|
|
2
|
-
import { iconVariants } from './styles.css';
|
|
3
|
-
|
|
4
|
-
const Svg = () => (
|
|
5
|
-
<svg
|
|
6
|
-
width="24"
|
|
7
|
-
height="24"
|
|
8
|
-
viewBox="0 0 24 24"
|
|
9
|
-
fill="none"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
role="img"
|
|
12
|
-
aria-labelledby="positive-circle-title"
|
|
13
|
-
>
|
|
14
|
-
<title id="positive-circle-title">Positive Circle Icon</title>
|
|
15
|
-
<path
|
|
16
|
-
d="M21.6004 11.9999C21.6004 17.3018 17.3023 21.5999 12.0004 21.5999C6.69846 21.5999 2.40039 17.3018 2.40039 11.9999C2.40039 6.69797 6.69846 2.3999 12.0004 2.3999C17.3023 2.3999 21.6004 6.69797 21.6004 11.9999Z"
|
|
17
|
-
fill="#14A554"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
fillRule="evenodd"
|
|
21
|
-
clipRule="evenodd"
|
|
22
|
-
d="M16.5798 7.79868L10.8701 16.7999L7.20039 12.6764L8.03544 11.9332L10.7199 14.9497L15.6359 7.1999L16.5798 7.79868Z"
|
|
23
|
-
fill="white"
|
|
24
|
-
/>
|
|
25
|
-
</svg>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const SvgPositiveCircleIcon = ({ size = 'sm', ...props }: IconProps) => (
|
|
29
|
-
<Box
|
|
30
|
-
as={Svg}
|
|
31
|
-
className={iconVariants({
|
|
32
|
-
size,
|
|
33
|
-
})}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default SvgPositiveCircleIcon;
|