@exodus/activity-txs 4.7.1 → 4.8.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,18 @@
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
+ ## [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)
7
+
8
+ ### Features
9
+
10
+ - feat: add fiat orders without tx (#12625)
11
+
12
+ ## [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)
13
+
14
+ ### Bug Fixes
15
+
16
+ - fix: Cross-Portfolio Swap Transactions Appear in All Portfolios (#12623)
17
+
6
18
  ## [4.7.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.7.0...@exodus/activity-txs@4.7.1) (2025-05-20)
7
19
 
8
20
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "4.7.1",
3
+ "version": "4.8.0",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "@exodus/fiat-ramp": "^12.8.2",
54
54
  "@exodus/logger": "^1.2.3",
55
55
  "@exodus/nfts": "^9.5.1",
56
- "@exodus/orders": "^5.1.0",
56
+ "@exodus/orders": "^5.2.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": "0111b992b3c55bd2eadbbbf55ff7e22a7419631e"
66
+ "gitHead": "d3c67850be7b467387e87c816cf3367721d07934"
67
67
  }
@@ -102,11 +102,16 @@ const createAssetSourceBaseActivitySelectorDefinition = {
102
102
  const orderIdsFromActivity = new Set(
103
103
  activityResult.map((item) => item.order?.orderId)
104
104
  )
105
- const ordersForIndexlessAssets = [...orderSet].filter(
106
- (order) =>
107
- [order.fromAsset, order.toAsset].includes(assetName) &&
108
- order.exodusStatus !== 'syncing'
109
- )
105
+ const ordersForIndexlessAssets = [...orderSet].filter((order) => {
106
+ const isFromAsset =
107
+ order.fromAsset === assetName && order.fromWalletAccount === walletAccount
108
+ const isToAsset =
109
+ order.toAsset === assetName && order.toWalletAccount === walletAccount
110
+
111
+ const shouldDisplay =
112
+ isFromAsset || isToAsset || !order.fromWalletAccount || !order.toWalletAccount
113
+ return shouldDisplay && order.exodusStatus !== 'syncing'
114
+ })
110
115
 
111
116
  ordersForIndexlessAssets.forEach((order) => {
112
117
  // Prevent dups by checking if this order already exists.
@@ -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, displayOrdersWithoutTx = 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 (displayOrdersWithoutTx) {
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