@exodus/activity-txs 6.1.6 → 6.1.8
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.8](https://github.com/ExodusMovement/exodus/compare/@exodus/activity-txs@6.1.7...@exodus/activity-txs@6.1.8) (2026-08-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **activity-txs:** return empty activity when tx source selector returns null ([#44246](https://github.com/ExodusMovement/exodus/issues/44246)) ([3d62429](https://github.com/ExodusMovement/exodus/commit/3d62429dea3711c7bde0893db9d4d3975ce6eeaa))
|
|
11
|
+
|
|
12
|
+
## [6.1.7](https://github.com/ExodusMovement/exodus/compare/@exodus/activity-txs@6.1.6...@exodus/activity-txs@6.1.7) (2026-08-03)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **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))
|
|
17
|
+
|
|
6
18
|
## [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)
|
|
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.
|
|
3
|
+
"version": "6.1.8",
|
|
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
|
|
8
|
+
"url": "git+https://github.com/ExodusMovement/exodus.git"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/ExodusMovement/exodus
|
|
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
|
|
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",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"typecheck": "pnpm exec tsc -p tsconfig.json --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@exodus/atoms": "^10.3.
|
|
37
|
-
"@exodus/basic-utils": "^5.
|
|
38
|
-
"@exodus/core-selectors": "^4.0.
|
|
39
|
-
"@exodus/models": "^13.
|
|
36
|
+
"@exodus/atoms": "^10.3.4",
|
|
37
|
+
"@exodus/basic-utils": "^5.2.0",
|
|
38
|
+
"@exodus/core-selectors": "^4.0.3",
|
|
39
|
+
"@exodus/models": "^13.3.1",
|
|
40
40
|
"@exodus/multi-account-redux": "^3.0.0",
|
|
41
|
-
"@exodus/safe-string": "^1.
|
|
42
|
-
"@exodus/typeforce": "^1.19.
|
|
41
|
+
"@exodus/safe-string": "^1.5.0",
|
|
42
|
+
"@exodus/typeforce": "^1.19.4",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
44
|
"minimalistic-assert": "^1.0.1",
|
|
45
45
|
"reselect": "^3.0.1"
|
|
@@ -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.
|
|
51
|
-
"@exodus/available-assets": "^8.11.
|
|
50
|
+
"@exodus/assets-feature": "^9.3.1",
|
|
51
|
+
"@exodus/available-assets": "^8.11.1",
|
|
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.
|
|
55
|
+
"@exodus/fiat-ramp": "^15.26.0",
|
|
56
56
|
"@exodus/logger": "^1.2.3",
|
|
57
|
-
"@exodus/nfts": "^9.6.
|
|
58
|
-
"@exodus/orders": "^6.2.
|
|
59
|
-
"@exodus/personal-notes": "^3.9.
|
|
57
|
+
"@exodus/nfts": "^9.6.3",
|
|
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.
|
|
61
|
+
"@exodus/wallet-accounts": "^20.4.11",
|
|
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": "
|
|
69
|
+
"gitHead": "6228a18aa13a828bf869effbb9f27cb0558b8e38"
|
|
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 {
|
|
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,7 +64,9 @@ const bridgeAmountKey = (tx) =>
|
|
|
61
64
|
const amountSign = (tx) => (tx.coinAmount.toBaseString().startsWith('-') ? -1 : 1)
|
|
62
65
|
|
|
63
66
|
const groupTxsWithSameOrder = ({ txs, orderSet, isIndexless }) => {
|
|
64
|
-
|
|
67
|
+
// A missing asset makes the upstream tx-log selector return null, which
|
|
68
|
+
// bypasses the `txs = EMPTY` default (it only covers undefined).
|
|
69
|
+
const txList = Array.isArray(txs) ? txs : txs ? [...txs] : EMPTY
|
|
65
70
|
if (!orderSet) return txList.map((tx) => ({ tx, type: 'tx' }))
|
|
66
71
|
|
|
67
72
|
const classifiedTxs = txList.map((tx) => ({ tx, ...classifyTx({ tx, orderSet }) }))
|
|
@@ -118,8 +123,13 @@ const groupTxsWithSameOrder = ({ txs, orderSet, isIndexless }) => {
|
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
exchangeByOrderId.forEach(({ order, txs: txsGroup }) => {
|
|
121
|
-
const
|
|
122
|
-
|
|
126
|
+
const sortedByDateDesc = txsGroup.sort((a, b) => b.date.getTime() - a.date.getTime())
|
|
127
|
+
const swapLeg = sortedByDateDesc.find(
|
|
128
|
+
(tx) =>
|
|
129
|
+
order.txIds?.find((txFromOrder) => txFromOrder.txId === tx.txId)?.txType ===
|
|
130
|
+
EXODEX_TX_TYPES.SWAP
|
|
131
|
+
)
|
|
132
|
+
result.push({ tx: swapLeg ?? sortedByDateDesc[0], type: 'exchange', order })
|
|
123
133
|
})
|
|
124
134
|
|
|
125
135
|
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:
|
|
41
|
+
type: TX_TYPES.EXCHANGE,
|
|
56
42
|
pending,
|
|
57
43
|
failed,
|
|
58
44
|
sent: order.fromAsset === assetName,
|