@exodus/activity-txs 4.7.2 → 5.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.8.0...@exodus/activity-txs@5.0.0) (2025-05-29)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ - rename argument for pending fiat orders (#12718)
11
+
12
+ ### Features
13
+
14
+ - feat!: rename argument for pending fiat orders (#12718)
15
+
16
+ ## [4.8.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.7.2...@exodus/activity-txs@4.8.0) (2025-05-22)
17
+
18
+ ### Features
19
+
20
+ - feat: add fiat orders without tx (#12625)
21
+
6
22
  ## [4.7.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.7.1...@exodus/activity-txs@4.7.2) (2025-05-21)
7
23
 
8
24
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "4.7.2",
3
+ "version": "5.0.0",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -50,10 +50,10 @@
50
50
  "@exodus/bitcoin-plugin": "^1.4.2",
51
51
  "@exodus/connected-origins": "^4.3.0",
52
52
  "@exodus/error-tracking": "^2.0.0",
53
- "@exodus/fiat-ramp": "^12.8.2",
53
+ "@exodus/fiat-ramp": "^12.9.0",
54
54
  "@exodus/logger": "^1.2.3",
55
55
  "@exodus/nfts": "^9.5.1",
56
- "@exodus/orders": "^5.2.0",
56
+ "@exodus/orders": "^5.3.0",
57
57
  "@exodus/personal-notes": "^3.8.0",
58
58
  "@exodus/redux-dependency-injection": "^4.1.1",
59
59
  "@exodus/wallet-accounts": "^17.5.2",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "b42e3d69aa3d91cbb9e524625e8249bb70979e54"
66
+ "gitHead": "4cc92d5c28fdd93aca7cdfd6d3518e4b905e9b0d"
67
67
  }
@@ -2,6 +2,7 @@ import { memoize } from '@exodus/basic-utils'
2
2
  import { createSelector } from 'reselect'
3
3
  import assert from 'minimalistic-assert'
4
4
  import { TX_TYPES } from '../constants/tx-types.js'
5
+ import { ORDER_STATUS } from '@exodus/models/lib/fiat-order/constants.js'
5
6
 
6
7
  const selectorFactory =
7
8
  (visibleOrdersSelector, assetsSelector) =>
@@ -9,7 +10,7 @@ const selectorFactory =
9
10
  assert(createActivitySelector, 'please provide activitySelector')
10
11
 
11
12
  return memoize(
12
- ({ assetName, walletAccount, ...rest }) => {
13
+ ({ assetName, walletAccount, displayFiatOrdersWithoutTx = false, ...rest }) => {
13
14
  const activitySelector = createActivitySelector({ assetName, walletAccount, ...rest })
14
15
  assert(activitySelector, 'createActivitySelector must return selector')
15
16
  if (visibleOrdersSelector.isFallback) return activitySelector
@@ -40,6 +41,30 @@ const selectorFactory =
40
41
  }
41
42
  }
42
43
 
44
+ if (displayFiatOrdersWithoutTx) {
45
+ for (const fiatOrder of fiatOrders) {
46
+ const isOrderWithoutTx = !fiatOrder.txId
47
+ const isRelatedBuyOrder =
48
+ fiatOrder.toWalletAccount === walletAccount && fiatOrder.toAsset === assetName
49
+ const isRelatedSellOrder =
50
+ fiatOrder.fromWalletAccount === walletAccount && fiatOrder.fromAsset === assetName
51
+
52
+ if (isOrderWithoutTx && (isRelatedBuyOrder || isRelatedSellOrder)) {
53
+ hasChanges = true
54
+ const activityItem = {
55
+ id: `${assetName}.fiat-order-without-tx.${fiatOrder.orderId}`,
56
+ assetName,
57
+ walletAccount,
58
+ fiatOrder,
59
+ type: TX_TYPES.FIAT,
60
+ pending: fiatOrder.exodusStatus === ORDER_STATUS.in_progress,
61
+ date: fiatOrder.date || new Date(),
62
+ }
63
+ resultActivity.push(activityItem)
64
+ }
65
+ }
66
+ }
67
+
43
68
  if (!hasChanges) return activity
44
69
 
45
70
  return resultActivity