@exodus/activity-txs 6.1.5 → 6.1.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.
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
+ ## [6.1.7](https://github.com/ExodusMovement/exodus/compare/@exodus/activity-txs@6.1.6...@exodus/activity-txs@6.1.7) (2026-08-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **activity-txs:** type grouped swap rows as exchange via their swap leg ([#42988](https://github.com/ExodusMovement/exodus/issues/42988)) ([f8309b8](https://github.com/ExodusMovement/exodus/commit/f8309b8f071b2884093a110e7a1c8823d43ac60c))
11
+
12
+ ## [6.1.6](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@6.1.5...@exodus/activity-txs@6.1.6) (2026-06-27)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **activity-txs:** handle iterable (TxSet) tx source in groupTxsWithSameOrder ([#17380](https://github.com/ExodusMovement/exodus-hydra/issues/17380)) ([9ad4b9f](https://github.com/ExodusMovement/exodus-hydra/commit/9ad4b9f3ffc9f01708498ebf1286c932b0b7a999))
17
+
6
18
  ## [6.1.5](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@6.1.4...@exodus/activity-txs@6.1.5) (2026-06-25)
7
19
 
8
20
  ### Bug Fixes
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "6.1.5",
3
+ "version": "6.1.7",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
8
+ "url": "git+https://github.com/ExodusMovement/exodus.git"
9
9
  },
10
- "homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/features/activity-txs",
10
+ "homepage": "https://github.com/ExodusMovement/exodus/tree/master/libs/features/activity-txs",
11
11
  "license": "MIT",
12
12
  "bugs": {
13
- "url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Aactivity-txs"
13
+ "url": "https://github.com/ExodusMovement/exodus/issues?q=is%3Aissue+is%3Aopen+label%3Aactivity-txs"
14
14
  },
15
15
  "type": "module",
16
16
  "main": "index.js",
@@ -47,18 +47,18 @@
47
47
  "devDependencies": {
48
48
  "@exodus/assets": "^11.0.0",
49
49
  "@exodus/assets-base": "^12.0.0",
50
- "@exodus/assets-feature": "^9.2.3",
50
+ "@exodus/assets-feature": "^9.2.5",
51
51
  "@exodus/available-assets": "^8.11.0",
52
52
  "@exodus/bitcoin-plugin": "^2.0.0",
53
53
  "@exodus/connected-origins": "^4.3.0",
54
54
  "@exodus/error-tracking": "^3.6.0",
55
- "@exodus/fiat-ramp": "^15.21.2",
55
+ "@exodus/fiat-ramp": "^15.26.0",
56
56
  "@exodus/logger": "^1.2.3",
57
57
  "@exodus/nfts": "^9.6.2",
58
- "@exodus/orders": "^6.2.2",
59
- "@exodus/personal-notes": "^3.9.0",
58
+ "@exodus/orders": "^6.2.5",
59
+ "@exodus/personal-notes": "^3.9.1",
60
60
  "@exodus/redux-dependency-injection": "^5.0.0",
61
- "@exodus/wallet-accounts": "^20.4.8",
61
+ "@exodus/wallet-accounts": "^20.4.9",
62
62
  "@types/minimalistic-assert": "^1.0.1",
63
63
  "redux": "^4.2.1"
64
64
  },
@@ -66,5 +66,5 @@
66
66
  "access": "public",
67
67
  "provenance": false
68
68
  },
69
- "gitHead": "a6dcf7d36c9d935dc3016b156b8646c4e739d7c6"
69
+ "gitHead": "33eaa7be28a81807f8a262e4be0cbc3791e66872"
70
70
  }
@@ -1,7 +1,10 @@
1
1
  import { createSelector } from 'reselect'
2
2
  import { memoize } from '@exodus/basic-utils'
3
3
  import { formattersByType } from '../utils/activity-formatters/index.js'
4
- import { formatUnindexedOrder } from '../utils/activity-formatters/format-swap-activity.js'
4
+ import {
5
+ EXODEX_TX_TYPES,
6
+ formatUnindexedOrder,
7
+ } from '../utils/activity-formatters/format-swap-activity.js'
5
8
 
6
9
  const EMPTY = Object.freeze([])
7
10
 
@@ -61,9 +64,10 @@ const bridgeAmountKey = (tx) =>
61
64
  const amountSign = (tx) => (tx.coinAmount.toBaseString().startsWith('-') ? -1 : 1)
62
65
 
63
66
  const groupTxsWithSameOrder = ({ txs, orderSet, isIndexless }) => {
64
- if (!orderSet) return txs.map((tx) => ({ tx, type: 'tx' }))
67
+ const txList = Array.isArray(txs) ? txs : [...txs]
68
+ if (!orderSet) return txList.map((tx) => ({ tx, type: 'tx' }))
65
69
 
66
- const classifiedTxs = txs.map((tx) => ({ tx, ...classifyTx({ tx, orderSet }) }))
70
+ const classifiedTxs = txList.map((tx) => ({ tx, ...classifyTx({ tx, orderSet }) }))
67
71
 
68
72
  const orphanCounterparts = []
69
73
  for (const { tx, type } of classifiedTxs) {
@@ -117,8 +121,13 @@ const groupTxsWithSameOrder = ({ txs, orderSet, isIndexless }) => {
117
121
  }
118
122
 
119
123
  exchangeByOrderId.forEach(({ order, txs: txsGroup }) => {
120
- const tx = txsGroup.sort((a, b) => b.date.getTime() - a.date.getTime())[0]
121
- result.push({ tx, type: 'exchange', order })
124
+ const sortedByDateDesc = txsGroup.sort((a, b) => b.date.getTime() - a.date.getTime())
125
+ const swapLeg = sortedByDateDesc.find(
126
+ (tx) =>
127
+ order.txIds?.find((txFromOrder) => txFromOrder.txId === tx.txId)?.txType ===
128
+ EXODEX_TX_TYPES.SWAP
129
+ )
130
+ result.push({ tx: swapLeg ?? sortedByDateDesc[0], type: 'exchange', order })
122
131
  })
123
132
 
124
133
  return result
@@ -7,20 +7,13 @@ const FINAL_ORDER_STATUS = {
7
7
  success: 'complete',
8
8
  }
9
9
 
10
- const EXODEX_TX_TYPES = {
10
+ export const EXODEX_TX_TYPES = {
11
11
  PRE_SETUP: 'preSetupTransaction',
12
12
  SETUP: 'setupTransaction',
13
13
  SWAP: 'swapTransaction',
14
14
  CLEANUP: 'cleanupTransaction',
15
15
  }
16
16
 
17
- const UI_TX_TYPE_FROM_EXODEX = new Map([
18
- [EXODEX_TX_TYPES.PRE_SETUP, TX_TYPES.APPROVAL],
19
- [EXODEX_TX_TYPES.SETUP, TX_TYPES.APPROVAL],
20
- [EXODEX_TX_TYPES.SWAP, TX_TYPES.EXCHANGE],
21
- [EXODEX_TX_TYPES.CLEANUP, TX_TYPES.CLEANUP],
22
- ])
23
-
24
17
  function getSwapDisplayAmount({ tx, order }) {
25
18
  if (tx.coinName === order.fromAsset && order.fromAmount) return order.fromAmount.abs()
26
19
  if (tx.coinName === order.toAsset && order.toAmount) return order.toAmount.abs()
@@ -28,13 +21,6 @@ function getSwapDisplayAmount({ tx, order }) {
28
21
  return null
29
22
  }
30
23
 
31
- function getOrderType({ order, tx }) {
32
- const txInfoFromOrder = tx
33
- ? order.txIds?.find((txFromOrder) => txFromOrder.txId === tx.txId)
34
- : null
35
- return UI_TX_TYPE_FROM_EXODEX.get(txInfoFromOrder?.txType) || TX_TYPES.EXCHANGE
36
- }
37
-
38
24
  const getSwapSharedProps = ({
39
25
  date,
40
26
  assetName,
@@ -52,7 +38,7 @@ const getSwapSharedProps = ({
52
38
  date,
53
39
  id: `swap.${assetName}.${order?.orderId || txId}`,
54
40
  assetName,
55
- type: getOrderType({ tx, order }),
41
+ type: TX_TYPES.EXCHANGE,
56
42
  pending,
57
43
  failed,
58
44
  sent: order.fromAsset === assetName,