@0xsequence/marketplace-sdk 0.3.5 → 0.3.7

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 (61) hide show
  1. package/dist/{chunk-URTXTVOU.js → chunk-3LGNSRBR.js} +476 -417
  2. package/dist/chunk-3LGNSRBR.js.map +1 -0
  3. package/dist/{chunk-RZSZNVEH.js → chunk-L6GSYPCR.js} +5 -5
  4. package/dist/{chunk-RZSZNVEH.js.map → chunk-L6GSYPCR.js.map} +1 -1
  5. package/dist/{chunk-Q57TEA3Z.js → chunk-NMCGA2TB.js} +4 -2
  6. package/dist/chunk-NMCGA2TB.js.map +1 -0
  7. package/dist/{chunk-6LQST3KZ.js → chunk-QGELCUYG.js} +27 -15
  8. package/dist/chunk-QGELCUYG.js.map +1 -0
  9. package/dist/index.js +6 -6
  10. package/dist/react/hooks/index.d.ts +3 -1
  11. package/dist/react/hooks/index.js +3 -3
  12. package/dist/react/index.js +6 -6
  13. package/dist/react/ui/components/index.js +6 -6
  14. package/dist/react/ui/index.d.ts +4 -21
  15. package/dist/react/ui/index.js +6 -6
  16. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +1 -1
  17. package/dist/react/ui/modals/_internal/components/actionModal/index.js +1 -1
  18. package/dist/react/ui/styles/index.d.ts +1 -1
  19. package/dist/styles/index.d.ts +1 -1
  20. package/dist/styles/index.js +1 -1
  21. package/dist/utils/abi/index.js +5 -5
  22. package/dist/utils/index.js +5 -5
  23. package/package.json +1 -1
  24. package/src/react/_internal/transaction-machine/execute-transaction.ts +10 -3
  25. package/src/react/_internal/transaction-machine/useTransactionMachine.ts +18 -5
  26. package/src/react/ui/components/_internals/action-button/ActionButton.tsx +1 -1
  27. package/src/react/ui/components/_internals/custom-select/CustomSelect.tsx +4 -4
  28. package/src/react/ui/modals/BuyModal/index.tsx +42 -10
  29. package/src/react/ui/modals/CreateListingModal/index.tsx +9 -16
  30. package/src/react/ui/modals/MakeOfferModal/_store.ts +1 -1
  31. package/src/react/ui/modals/MakeOfferModal/index.tsx +9 -12
  32. package/src/react/ui/modals/SellModal/index.tsx +10 -10
  33. package/src/react/ui/modals/TransferModal/_store.ts +12 -10
  34. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +2 -2
  35. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/useHandleTransfer.tsx +16 -38
  36. package/src/react/ui/modals/TransferModal/index.tsx +7 -9
  37. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +4 -2
  38. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +15 -7
  39. package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +9 -18
  40. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +1 -1
  41. package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +25 -3
  42. package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +2 -0
  43. package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +4 -4
  44. package/src/react/ui/modals/_internal/components/transaction-footer/index.tsx +7 -4
  45. package/src/react/ui/modals/_internal/components/transactionPreview/consts.ts +10 -5
  46. package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +27 -8
  47. package/src/react/ui/modals/_internal/components/transactionPreview/useTransactionPreviewTitle.tsx +3 -5
  48. package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +80 -62
  49. package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +21 -29
  50. package/src/react/ui/modals/_internal/components/transactionStatusModal/util/getFormattedType.ts +23 -0
  51. package/src/react/ui/modals/_internal/components/transactionStatusModal/util/getMessage.ts +29 -0
  52. package/src/react/ui/modals/_internal/components/transactionStatusModal/util/getTitle.ts +43 -0
  53. package/tsconfig.tsbuildinfo +1 -1
  54. package/dist/chunk-6LQST3KZ.js.map +0 -1
  55. package/dist/chunk-Q57TEA3Z.js.map +0 -1
  56. package/dist/chunk-URTXTVOU.js.map +0 -1
  57. package/src/react/ui/modals/CreateListingModal/_utils/getCreateListingTransactionTitleMessage.ts +0 -30
  58. package/src/react/ui/modals/MakeOfferModal/_utils/getMakeOfferTransactionTitleMessage.ts +0 -28
  59. package/src/react/ui/modals/SellModal/_utils/getSellTransactionTitleMessage.ts +0 -28
  60. package/src/react/ui/modals/TransferModal/_utils/getTransferTransactionTitleMessage.ts +0 -28
  61. package/src/types/callbacks.ts +0 -51
@@ -1,51 +0,0 @@
1
- export type BaseCallbacks = {
2
- onSuccess?: () => void;
3
- onUnknownError?: (error: Error | unknown) => void;
4
- };
5
-
6
- export type SwitchChainCallbacks = BaseCallbacks & {
7
- onSwitchingNotSupported?: () => void;
8
- onUserRejectedRequest?: () => void;
9
- };
10
-
11
- export type OnApproveTokenError = (error: Error | unknown) => void;
12
-
13
- export type BaseErrorCallbacks = {
14
- onApproveTokenError?: OnApproveTokenError;
15
- onSwitchingNotSupportedError?: () => void;
16
- onUserRejectedSwitchingChainRequestError?: () => void;
17
- onSwitchChainError?: (error: Error | unknown) => void;
18
- };
19
-
20
- export type BaseSuccessCallbacks = {
21
- onApproveTokenSuccess?: () => void;
22
- onSwitchChainSuccess?: () => void;
23
- };
24
-
25
- export type CreateListingErrorCallbacks = BaseErrorCallbacks & {
26
- onCreateListingError?: (error: Error | unknown) => void;
27
- };
28
- export type CreateListingSuccessCallbacks = BaseSuccessCallbacks & {
29
- onCreateListingSuccess?: () => void;
30
- };
31
-
32
- export type MakeOfferErrorCallbacks = BaseErrorCallbacks & {
33
- onMakeOfferError?: (error: Error | unknown) => void;
34
- };
35
- export type MakeOfferSuccessCallbacks = BaseSuccessCallbacks & {
36
- onMakeOfferSuccess?: () => void;
37
- };
38
-
39
- export type SellErrorCallbacks = BaseErrorCallbacks & {
40
- onSellError?: (error: Error | unknown) => void;
41
- };
42
- export type SellSuccessCallbacks = BaseSuccessCallbacks & {
43
- onSellSuccess?: () => void;
44
- };
45
-
46
- export type TransferErrorCallbacks = BaseErrorCallbacks & {
47
- onTransferError?: (error: Error | unknown) => void;
48
- };
49
- export type TransferSuccessCallbacks = BaseSuccessCallbacks & {
50
- onTransferSuccess?: () => void;
51
- };