@exodus/activity-txs 5.1.0 → 6.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 +18 -0
- package/README.md +1 -1
- package/package.json +7 -7
- package/redux/selectors/create-with-fiat-activity.js +48 -23
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@5.0.2...@exodus/activity-txs@6.0.0) (2026-01-26)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- **orders:** use typescript (#14786)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- feat: update all consumers to use safe strings for error namespaces (#14429)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- fix(activity-txs): fiat order duplicates wallet order (#14959)
|
|
19
|
+
|
|
20
|
+
- fix: update NFT transaction sent status calculation (#14359)
|
|
21
|
+
|
|
22
|
+
- refactor(orders)!: use typescript (#14786)
|
|
23
|
+
|
|
6
24
|
## [5.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@5.0.2...@exodus/activity-txs@5.1.0) (2025-11-19)
|
|
7
25
|
|
|
8
26
|
### Features
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This feature generates user-friendly activity from transactions, orders, fiat or
|
|
|
4
4
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
7
|
-
Each asset’s activity consists of a set of transactions transformed using `asset.api.getActivityTxs`, which returns an array of Tx [models](https://github.com/
|
|
7
|
+
Each asset’s activity consists of a set of transactions transformed using `asset.api.getActivityTxs`, which returns an array of Tx [models](https://github.com/ExodusOSS/hydra/blob/7743f4ffcbdb0605deb4943a90ef2e718776c3bf/libraries/models/src/tx/index.ts#L60): `[Tx, Tx, Tx]`.
|
|
8
8
|
|
|
9
9
|
**Most assets don't have this API and simply return the original transactions.**
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/activity-txs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "The activity-txs feature",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@exodus/assets": "^11.0.0",
|
|
48
48
|
"@exodus/assets-base": "^10.0.0",
|
|
49
|
-
"@exodus/assets-feature": "^8.
|
|
50
|
-
"@exodus/available-assets": "^8.
|
|
49
|
+
"@exodus/assets-feature": "^8.8.0",
|
|
50
|
+
"@exodus/available-assets": "^8.10.1",
|
|
51
51
|
"@exodus/bitcoin-plugin": "^1.4.2",
|
|
52
52
|
"@exodus/connected-origins": "^4.3.0",
|
|
53
53
|
"@exodus/error-tracking": "^3.3.0",
|
|
54
|
-
"@exodus/fiat-ramp": "^15.
|
|
54
|
+
"@exodus/fiat-ramp": "^15.10.0",
|
|
55
55
|
"@exodus/logger": "^1.2.3",
|
|
56
|
-
"@exodus/nfts": "^9.6.
|
|
57
|
-
"@exodus/orders": "^
|
|
56
|
+
"@exodus/nfts": "^9.6.2",
|
|
57
|
+
"@exodus/orders": "^6.0.1",
|
|
58
58
|
"@exodus/personal-notes": "^3.9.0",
|
|
59
59
|
"@exodus/redux-dependency-injection": "^4.1.2",
|
|
60
60
|
"@exodus/wallet-accounts": "^20.2.1",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"access": "public",
|
|
66
66
|
"provenance": false
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d818fc93bdc6d714f1fbbdcef90b5f1cc21680e2"
|
|
69
69
|
}
|
|
@@ -2,7 +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
|
+
import { ORDER_STATUS, ORDER_TYPES } from '@exodus/models/lib/fiat-order/constants.js'
|
|
6
6
|
|
|
7
7
|
const selectorFactory =
|
|
8
8
|
(visibleOrdersSelector, assetsSelector) =>
|
|
@@ -24,8 +24,29 @@ const selectorFactory =
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
let hasChanges = false
|
|
27
|
+
const pendingFiatOrdersWithoutTx = []
|
|
28
|
+
const fiatOrdersWithoutTx = []
|
|
29
|
+
|
|
30
|
+
if (displayFiatOrdersWithoutTx) {
|
|
31
|
+
for (const order of fiatOrders) {
|
|
32
|
+
if (order.txId) continue
|
|
33
|
+
|
|
34
|
+
const isRelatedBuyOrder =
|
|
35
|
+
order.toWalletAccount === walletAccount && order.toAsset === assetName
|
|
36
|
+
const isRelatedSellOrder =
|
|
37
|
+
order.fromWalletAccount === walletAccount && order.fromAsset === assetName
|
|
38
|
+
|
|
39
|
+
if (isRelatedBuyOrder || isRelatedSellOrder) {
|
|
40
|
+
fiatOrdersWithoutTx.push(order)
|
|
41
|
+
if (order.exodusStatus === ORDER_STATUS.in_progress) {
|
|
42
|
+
pendingFiatOrdersWithoutTx.push(order)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
27
47
|
|
|
28
48
|
const resultActivity = []
|
|
49
|
+
|
|
29
50
|
for (const activityItem of activity) {
|
|
30
51
|
const fiatOrdersByTx = fiatOrders.getAllByTxId(activityItem.txId)
|
|
31
52
|
|
|
@@ -41,34 +62,38 @@ const selectorFactory =
|
|
|
41
62
|
})
|
|
42
63
|
}
|
|
43
64
|
} else {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
if (activityItem.pending && pendingFiatOrdersWithoutTx.length > 0) {
|
|
66
|
+
const matchingOrderIndex = pendingFiatOrdersWithoutTx.findIndex((order) => {
|
|
67
|
+
const orderAmount =
|
|
68
|
+
order.orderType === ORDER_TYPES.sell ? order.fromAmount : order.toAmount
|
|
47
69
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (isOrderWithoutTx && (isRelatedBuyOrder || isRelatedSellOrder)) {
|
|
57
|
-
hasChanges = true
|
|
58
|
-
const activityItem = {
|
|
59
|
-
id: `${assetName}.fiat-order-without-tx.${fiatOrder.orderId}`,
|
|
60
|
-
assetName,
|
|
61
|
-
walletAccount,
|
|
62
|
-
fiatOrder,
|
|
63
|
-
type: TX_TYPES.FIAT,
|
|
64
|
-
pending: fiatOrder.exodusStatus === ORDER_STATUS.in_progress,
|
|
65
|
-
date: fiatOrder.date || new Date(),
|
|
70
|
+
return activityItem.tx?.coinAmount?.abs().equals(orderAmount)
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
if (matchingOrderIndex !== -1) {
|
|
74
|
+
hasChanges = true
|
|
75
|
+
pendingFiatOrdersWithoutTx.splice(matchingOrderIndex, 1)
|
|
76
|
+
continue
|
|
66
77
|
}
|
|
67
|
-
resultActivity.push(activityItem)
|
|
68
78
|
}
|
|
79
|
+
|
|
80
|
+
resultActivity.push(activityItem)
|
|
69
81
|
}
|
|
70
82
|
}
|
|
71
83
|
|
|
84
|
+
for (const fiatOrder of fiatOrdersWithoutTx) {
|
|
85
|
+
hasChanges = true
|
|
86
|
+
resultActivity.push({
|
|
87
|
+
id: `${assetName}.fiat-order-without-tx.${fiatOrder.orderId}`,
|
|
88
|
+
assetName,
|
|
89
|
+
walletAccount,
|
|
90
|
+
fiatOrder,
|
|
91
|
+
type: TX_TYPES.FIAT,
|
|
92
|
+
pending: fiatOrder.exodusStatus === ORDER_STATUS.in_progress,
|
|
93
|
+
date: fiatOrder.date || new Date(),
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
|
|
72
97
|
if (!hasChanges) return activity
|
|
73
98
|
|
|
74
99
|
return resultActivity
|