@exodus/activity-txs 4.1.5 → 4.2.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 +12 -0
- package/package.json +3 -3
- package/redux/selectors/create-batched-asset-source-by-id.js +11 -9
- package/redux/selectors/create-batched-asset-source.js +13 -11
- package/redux/selectors/create-limited-asset-source.js +6 -4
- package/redux/selectors/create-multi-activity.js +2 -1
- package/redux/utils/activity-formatters/format-swap-activity.js +1 -3
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.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.2.0...@exodus/activity-txs@4.2.1) (2024-05-30)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- memoize activity selectors ([#7223](https://github.com/ExodusMovement/exodus-hydra/issues/7223)) ([cf4cb47](https://github.com/ExodusMovement/exodus-hydra/commit/cf4cb478355548d355180c81ad15b0558d0d7ad6))
|
|
11
|
+
|
|
12
|
+
## [4.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.1.5...@exodus/activity-txs@4.2.0) (2024-05-29)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- order in activity ([#7220](https://github.com/ExodusMovement/exodus-hydra/issues/7220)) ([b32e3e0](https://github.com/ExodusMovement/exodus-hydra/commit/b32e3e0dd8d16e937c91017665f85c7ff1291120))
|
|
17
|
+
|
|
6
18
|
## [4.1.5](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.1.4...@exodus/activity-txs@4.1.5) (2024-05-29)
|
|
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.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "The activity-txs feature",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@exodus/connected-origins": "^3.3.1",
|
|
52
52
|
"@exodus/dependency-injection": "^2.2.0",
|
|
53
53
|
"@exodus/dependency-preprocessors": "^5.2.0",
|
|
54
|
-
"@exodus/fiat-ramp": "^10.
|
|
54
|
+
"@exodus/fiat-ramp": "^10.7.1",
|
|
55
55
|
"@exodus/nfts": "^9.3.0",
|
|
56
56
|
"@exodus/orders": "^4.9.0",
|
|
57
57
|
"@exodus/personal-notes": "^3.6.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"@types/minimalistic-assert": "^1.0.1",
|
|
62
62
|
"redux": "^4.2.1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "9169f83b1c385d7b59703e0bc763a544d28b46a8"
|
|
65
65
|
}
|
|
@@ -5,15 +5,17 @@ const createBatchedAssetSourceActivityByIdSelector = {
|
|
|
5
5
|
id: 'createBatchedAssetSourceActivityById',
|
|
6
6
|
dependencies: [{ selector: 'createBatchedAssetSourceSelector' }],
|
|
7
7
|
selectorFactory: (createBatchedAssetSourceSelector) =>
|
|
8
|
-
memoize(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
transformedTxs
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
memoize(
|
|
9
|
+
({ assetName, walletAccount, limit }) =>
|
|
10
|
+
createSelector(
|
|
11
|
+
createBatchedAssetSourceSelector({ assetName, walletAccount, limit }),
|
|
12
|
+
(transformedTxs) =>
|
|
13
|
+
transformedTxs.reduce((acc, tx) => {
|
|
14
|
+
;(acc[tx.txId] || (acc[tx.txId] = [])).push(tx)
|
|
15
|
+
return acc
|
|
16
|
+
}, Object.create(null))
|
|
17
|
+
),
|
|
18
|
+
({ assetName, walletAccount, limit }) => `${assetName}_${walletAccount}_${limit}`
|
|
17
19
|
),
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -58,17 +58,19 @@ const createBatchedAssetSourceSelectorDefinition = {
|
|
|
58
58
|
personalNotesWithBatchIdSelector,
|
|
59
59
|
assetsSelector
|
|
60
60
|
) =>
|
|
61
|
-
memoize(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
memoize(
|
|
62
|
+
({ assetName, walletAccount, limit }) =>
|
|
63
|
+
createSelector(
|
|
64
|
+
createLimitedAssetSourceSelector({ assetName, walletAccount, limit }),
|
|
65
|
+
personalNotesWithBatchIdSelector,
|
|
66
|
+
assetsSelector,
|
|
67
|
+
(txs, personalNotesWithBatchId, assets) => {
|
|
68
|
+
return personalNotesWithBatchId.size > 0
|
|
69
|
+
? groupAndCollapseBatched({ txs, personalNotesWithBatchId, assets })
|
|
70
|
+
: txs
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
({ assetName, walletAccount, limit }) => `${assetName}_${walletAccount}_${limit}`
|
|
72
74
|
),
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -5,10 +5,12 @@ const createLimitedAssetSourceSelectorDefinition = {
|
|
|
5
5
|
id: 'createLimitedAssetSourceSelector',
|
|
6
6
|
dependencies: [{ selector: 'createAssetSourceSelector' }],
|
|
7
7
|
selectorFactory: (createAssetSourceSelector) =>
|
|
8
|
-
memoize(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
memoize(
|
|
9
|
+
({ assetName, walletAccount, limit }) =>
|
|
10
|
+
createSelector(createAssetSourceSelector({ assetName, walletAccount }), (txs) =>
|
|
11
|
+
limit ? txs.slice(-limit) : txs
|
|
12
|
+
),
|
|
13
|
+
({ assetName, walletAccount, limit }) => `${assetName}_${walletAccount}_${limit}`
|
|
12
14
|
),
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -31,7 +31,8 @@ const selectorFactory =
|
|
|
31
31
|
let result = activities.flat()
|
|
32
32
|
if (dedupExchange) {
|
|
33
33
|
result = result.filter((activityItem) => {
|
|
34
|
-
const {
|
|
34
|
+
const { order } = activityItem
|
|
35
|
+
const orderId = order?.orderId
|
|
35
36
|
if (orderId) {
|
|
36
37
|
if (!ordersIncluded.has(orderId)) {
|
|
37
38
|
ordersIncluded.add(orderId)
|