@exodus/activity-txs 6.1.0 → 6.1.1
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,12 @@
|
|
|
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.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@6.1.0...@exodus/activity-txs@6.1.1) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- fix(activity-txs): avoid crashes for incomplete unindexed swap orders (#15662)
|
|
11
|
+
|
|
6
12
|
## [6.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@6.0.0...@exodus/activity-txs@6.1.0) (2026-02-05)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/activity-txs",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "The activity-txs feature",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@exodus/atoms": "^9.0.0",
|
|
36
|
-
"@exodus/basic-utils": "^3.
|
|
36
|
+
"@exodus/basic-utils": "^3.7.3",
|
|
37
37
|
"@exodus/core-selectors": "^4.0.0",
|
|
38
38
|
"@exodus/models": "^12.0.1",
|
|
39
39
|
"@exodus/multi-account-redux": "^2.0.1",
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@exodus/assets": "^11.0.0",
|
|
48
48
|
"@exodus/assets-base": "^10.0.0",
|
|
49
|
-
"@exodus/assets-feature": "^
|
|
50
|
-
"@exodus/available-assets": "^8.
|
|
51
|
-
"@exodus/bitcoin-plugin": "^
|
|
49
|
+
"@exodus/assets-feature": "^9.0.1",
|
|
50
|
+
"@exodus/available-assets": "^8.11.0",
|
|
51
|
+
"@exodus/bitcoin-plugin": "^2.0.0",
|
|
52
52
|
"@exodus/connected-origins": "^4.3.0",
|
|
53
|
-
"@exodus/error-tracking": "^3.3.
|
|
54
|
-
"@exodus/fiat-ramp": "^15.
|
|
53
|
+
"@exodus/error-tracking": "^3.3.2",
|
|
54
|
+
"@exodus/fiat-ramp": "^15.18.0",
|
|
55
55
|
"@exodus/logger": "^1.2.3",
|
|
56
56
|
"@exodus/nfts": "^9.6.2",
|
|
57
|
-
"@exodus/orders": "^6.0.
|
|
57
|
+
"@exodus/orders": "^6.0.9",
|
|
58
58
|
"@exodus/personal-notes": "^3.9.0",
|
|
59
59
|
"@exodus/redux-dependency-injection": "^4.1.2",
|
|
60
|
-
"@exodus/wallet-accounts": "^20.
|
|
60
|
+
"@exodus/wallet-accounts": "^20.3.0",
|
|
61
61
|
"@types/minimalistic-assert": "^1.0.1",
|
|
62
62
|
"redux": "^4.2.1"
|
|
63
63
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"access": "public",
|
|
66
66
|
"provenance": false
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "ba7c7b44e52c27e667210aef6dedd9bbdc05f4e5"
|
|
69
69
|
}
|
|
@@ -107,6 +107,7 @@ const createAssetSourceBaseActivitySelectorDefinition = {
|
|
|
107
107
|
tx,
|
|
108
108
|
personalNote,
|
|
109
109
|
})
|
|
110
|
+
if (!formattedTx) continue
|
|
110
111
|
|
|
111
112
|
activityResult.push({ ...formattedTx, walletAccount })
|
|
112
113
|
}
|
|
@@ -131,8 +132,11 @@ const createAssetSourceBaseActivitySelectorDefinition = {
|
|
|
131
132
|
// Prevent dups by checking if this order already exists.
|
|
132
133
|
if (orderIdsFromActivity.has(order.orderId)) return
|
|
133
134
|
|
|
135
|
+
const formattedOrder = formatUnindexedOrder({ assetName, order })
|
|
136
|
+
if (!formattedOrder) return
|
|
137
|
+
|
|
134
138
|
activityResult.push({
|
|
135
|
-
...
|
|
139
|
+
...formattedOrder,
|
|
136
140
|
walletAccount,
|
|
137
141
|
})
|
|
138
142
|
})
|
|
@@ -21,6 +21,13 @@ const UI_TX_TYPE_FROM_EXODEX = new Map([
|
|
|
21
21
|
[EXODEX_TX_TYPES.CLEANUP, TX_TYPES.CLEANUP],
|
|
22
22
|
])
|
|
23
23
|
|
|
24
|
+
function getSwapDisplayAmount({ tx, order }) {
|
|
25
|
+
if (tx.coinName === order.fromAsset && order.fromAmount) return order.fromAmount.abs()
|
|
26
|
+
if (tx.coinName === order.toAsset && order.toAmount) return order.toAmount.abs()
|
|
27
|
+
if (tx.coinAmount?.abs) return tx.coinAmount.abs()
|
|
28
|
+
return null
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
function getOrderType({ order, tx }) {
|
|
25
32
|
const txInfoFromOrder = tx
|
|
26
33
|
? order.txIds?.find((txFromOrder) => txFromOrder.txId === tx.txId)
|
|
@@ -58,24 +65,30 @@ const getSwapSharedProps = ({
|
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
|
-
export const formatSwapActivity = ({ tx, order, personalNote }) =>
|
|
62
|
-
|
|
68
|
+
export const formatSwapActivity = ({ tx, order, personalNote }) => {
|
|
69
|
+
const displayAmount = getSwapDisplayAmount({ tx, order })
|
|
70
|
+
if (!displayAmount) return null
|
|
71
|
+
|
|
72
|
+
return getSwapSharedProps({
|
|
63
73
|
date: tx.date,
|
|
64
74
|
assetName: tx.coinName,
|
|
65
75
|
txId: tx.txId,
|
|
66
76
|
tx,
|
|
67
77
|
order,
|
|
68
78
|
failed: !!(tx.failed || order.error),
|
|
69
|
-
displayAmount
|
|
79
|
+
displayAmount,
|
|
70
80
|
personalNote,
|
|
71
81
|
pending: order.exodusStatus === FINAL_ORDER_STATUS.inProgress,
|
|
72
82
|
})
|
|
83
|
+
}
|
|
73
84
|
|
|
74
85
|
export const formatUnindexedOrder = ({ order, assetName: _assetName, personalNote }) => {
|
|
75
86
|
const isFromIndexlessAsset = order.fromAsset === _assetName
|
|
76
87
|
const assetName = isFromIndexlessAsset ? order.fromAsset : order.toAsset
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
const amount = isFromIndexlessAsset ? order.fromAmount : order.toAmount
|
|
89
|
+
if (!amount) return null
|
|
90
|
+
|
|
91
|
+
const displayAmount = amount.abs()
|
|
79
92
|
const txId = isFromIndexlessAsset ? order.fromTxId : order.toTxId
|
|
80
93
|
|
|
81
94
|
return getSwapSharedProps({
|