@0xsequence/marketplace-sdk 0.8.3 → 0.8.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 (64) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/{chunk-FH4TZRDV.js → chunk-44YGZVBS.js} +2 -2
  3. package/dist/{chunk-QTV77W42.js → chunk-HRL2TMXU.js} +5 -5
  4. package/dist/chunk-HRL2TMXU.js.map +1 -0
  5. package/dist/{chunk-5ATGT5S4.js → chunk-VBRJ2OPM.js} +14 -6
  6. package/dist/chunk-VBRJ2OPM.js.map +1 -0
  7. package/dist/{chunk-DFI52A2E.js → chunk-VF3LWBQB.js} +365 -243
  8. package/dist/chunk-VF3LWBQB.js.map +1 -0
  9. package/dist/{chunk-FSJKN4YN.js → chunk-ZSCZLHKX.js} +194 -2
  10. package/dist/chunk-ZSCZLHKX.js.map +1 -0
  11. package/dist/index.js +5 -5
  12. package/dist/{lowestListing-DUZ_nYml.d.ts → lowestListing-W7P4EkC3.d.ts} +34 -11
  13. package/dist/react/_internal/databeat/index.js +4 -4
  14. package/dist/react/hooks/index.d.ts +8 -5
  15. package/dist/react/hooks/index.js +5 -3
  16. package/dist/react/index.d.ts +2 -2
  17. package/dist/react/index.js +8 -6
  18. package/dist/react/queries/index.d.ts +1 -1
  19. package/dist/react/queries/index.js +5 -1
  20. package/dist/react/ui/components/collectible-card/index.js +6 -6
  21. package/dist/react/ui/icons/index.js +1 -1
  22. package/dist/react/ui/index.js +6 -6
  23. package/dist/react/ui/modals/_internal/components/actionModal/index.js +4 -4
  24. package/dist/utils/abi/index.js +5 -5
  25. package/dist/utils/index.js +5 -5
  26. package/package.json +1 -1
  27. package/src/react/_internal/api/__mocks__/marketplace.msw.ts +35 -21
  28. package/src/react/hooks/__tests__/useCancelTransactionSteps.test.tsx +4 -9
  29. package/src/react/hooks/__tests__/useGenerateCancelTransaction.test.tsx +5 -4
  30. package/src/react/hooks/__tests__/useGenerateListingTransaction.test.tsx +14 -10
  31. package/src/react/hooks/__tests__/useGenerateOfferTransaction.test.tsx +115 -65
  32. package/src/react/hooks/__tests__/useGenerateSellTransaction.test.tsx +10 -7
  33. package/src/react/hooks/__tests__/useInventory.test.tsx +294 -0
  34. package/src/react/hooks/index.ts +1 -0
  35. package/src/react/hooks/useAutoSelectFeeOption.tsx +10 -3
  36. package/src/react/hooks/useCancelOrder.tsx +1 -0
  37. package/src/react/hooks/useCancelTransactionSteps.tsx +18 -4
  38. package/src/react/hooks/useGenerateOfferTransaction.tsx +11 -1
  39. package/src/react/hooks/useInventory.tsx +15 -0
  40. package/src/react/hooks/util/optimisticCancelUpdates.ts +115 -0
  41. package/src/react/queries/index.ts +1 -0
  42. package/src/react/queries/inventory.ts +303 -0
  43. package/src/react/queries/listBalances.ts +1 -8
  44. package/src/react/queries/listCollectibles.ts +12 -3
  45. package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +74 -104
  46. package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +108 -78
  47. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.test.tsx +286 -0
  48. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +16 -4
  49. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +35 -132
  50. package/src/react/ui/modals/_internal/components/floorPriceText/__tests__/FloorPriceText.test.tsx +199 -0
  51. package/src/react/ui/modals/_internal/components/priceInput/__tests__/PriceInput.test.tsx +55 -0
  52. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +1 -1
  53. package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +2 -2
  54. package/test/const.ts +24 -0
  55. package/test/test-utils.tsx +74 -26
  56. package/.changeset/flat-parks-clean.md +0 -8
  57. package/.changeset/red-buckets-deny.md +0 -6
  58. package/.changeset/seven-doors-taste.md +0 -5
  59. package/dist/chunk-5ATGT5S4.js.map +0 -1
  60. package/dist/chunk-DFI52A2E.js.map +0 -1
  61. package/dist/chunk-FSJKN4YN.js.map +0 -1
  62. package/dist/chunk-QTV77W42.js.map +0 -1
  63. package/src/react/ui/modals/_internal/components/priceInput/__tests__/index.test.tsx +0 -164
  64. /package/dist/{chunk-FH4TZRDV.js.map → chunk-44YGZVBS.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @0xsequence/marketplace-sdk
2
2
 
3
+ ## 0.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Added new `useInventory` hook that combines data from marketplace-api and indexer [#294](https://github.com/0xsequence/marketplace-sdk/pull/294)
8
+ - Added optimistic updates for listings and offers [#290](https://github.com/0xsequence/marketplace-sdk/pull/290)
9
+ - Improved test coverage and fixed various bugs
10
+
3
11
  ## 0.8.3
4
12
 
5
13
  ### Patch Changes
@@ -7,7 +15,6 @@
7
15
  - Updated marketplace API client
8
16
  - Fixed issue with off-chain cancellation failing on some chains, (Removed ExecuteType enum and replaced with new payload for execute endpoint)
9
17
 
10
-
11
18
  ## 0.8.2
12
19
 
13
20
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useConfig
3
- } from "./chunk-DFI52A2E.js";
3
+ } from "./chunk-VF3LWBQB.js";
4
4
 
5
5
  // src/react/_internal/databeat/index.ts
6
6
  import { Databeat } from "@databeat/tracker";
@@ -50,4 +50,4 @@ export {
50
50
  DatabeatAnalytics,
51
51
  useAnalytics
52
52
  };
53
- //# sourceMappingURL=chunk-FH4TZRDV.js.map
53
+ //# sourceMappingURL=chunk-44YGZVBS.js.map
@@ -2,10 +2,10 @@
2
2
 
3
3
  import {
4
4
  ActionModal
5
- } from "./chunk-5ATGT5S4.js";
5
+ } from "./chunk-VBRJ2OPM.js";
6
6
  import {
7
7
  useAnalytics
8
- } from "./chunk-FH4TZRDV.js";
8
+ } from "./chunk-44YGZVBS.js";
9
9
  import {
10
10
  BellIcon_default,
11
11
  CalendarIcon_default,
@@ -33,7 +33,7 @@ import {
33
33
  useSwitchChainModal,
34
34
  useTransferTokens,
35
35
  useWallet
36
- } from "./chunk-DFI52A2E.js";
36
+ } from "./chunk-VF3LWBQB.js";
37
37
  import {
38
38
  DEFAULT_MARKETPLACE_FEE_PERCENTAGE
39
39
  } from "./chunk-Y63BOO6M.js";
@@ -1364,7 +1364,7 @@ function PriceInput({
1364
1364
  "div",
1365
1365
  {
1366
1366
  className: cn(
1367
- "relative flex w-full flex-col",
1367
+ "price-input relative flex w-full flex-col",
1368
1368
  disabled && "pointer-events-none opacity-50"
1369
1369
  ),
1370
1370
  children: [
@@ -5404,4 +5404,4 @@ export {
5404
5404
  useSellModal,
5405
5405
  CollectibleCard
5406
5406
  };
5407
- //# sourceMappingURL=chunk-QTV77W42.js.map
5407
+ //# sourceMappingURL=chunk-HRL2TMXU.js.map