@exodus/activity-txs 4.2.2 → 4.3.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,16 @@
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.3.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.3.0...@exodus/activity-txs@4.3.1) (2024-07-18)
7
+
8
+ **Note:** Version bump only for package @exodus/activity-txs
9
+
10
+ ## [4.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.2.2...@exodus/activity-txs@4.3.0) (2024-06-13)
11
+
12
+ ### Features
13
+
14
+ - optional personal notes for activity ([#7377](https://github.com/ExodusMovement/exodus-hydra/issues/7377)) ([092f07d](https://github.com/ExodusMovement/exodus-hydra/commit/092f07d5d18c1afc2933672af77edd0c5bac98a5))
15
+
6
16
  ## [4.2.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.2.1...@exodus/activity-txs@4.2.2) (2024-06-11)
7
17
 
8
18
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "4.2.2",
3
+ "version": "4.3.1",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "test": "run -T jest"
31
31
  },
32
32
  "dependencies": {
33
- "@exodus/atoms": "^7.0.5",
33
+ "@exodus/atoms": "^8.0.0",
34
34
  "@exodus/basic-utils": "^2.3.0",
35
35
  "@exodus/core-selectors": "^1.5.0",
36
36
  "@exodus/models": "^10.1.0",
@@ -44,22 +44,22 @@
44
44
  "devDependencies": {
45
45
  "@exodus/assets": "^8.0.95",
46
46
  "@exodus/assets-base": "^8.1.10",
47
- "@exodus/assets-feature": "^5.4.0",
48
- "@exodus/available-assets": "^8.2.1",
47
+ "@exodus/assets-feature": "^5.8.1",
48
+ "@exodus/available-assets": "^8.3.1",
49
49
  "@exodus/bitcoin-plugin": "^1.4.2",
50
- "@exodus/blockchain-metadata": "^15.3.3",
51
- "@exodus/connected-origins": "^3.3.1",
52
- "@exodus/dependency-injection": "^2.2.0",
53
- "@exodus/dependency-preprocessors": "^5.2.0",
54
- "@exodus/fiat-ramp": "^10.7.3",
55
- "@exodus/nfts": "^9.3.0",
56
- "@exodus/orders": "^4.10.0",
57
- "@exodus/personal-notes": "^3.6.0",
58
- "@exodus/redux-dependency-injection": "^3.1.0",
50
+ "@exodus/blockchain-metadata": "^15.3.4",
51
+ "@exodus/connected-origins": "^3.3.3",
52
+ "@exodus/dependency-injection": "^2.3.1",
53
+ "@exodus/dependency-preprocessors": "^6.0.1",
54
+ "@exodus/fiat-ramp": "^10.9.1",
55
+ "@exodus/nfts": "^9.3.2",
56
+ "@exodus/orders": "^4.10.1",
57
+ "@exodus/personal-notes": "^3.6.1",
58
+ "@exodus/redux-dependency-injection": "^3.2.3",
59
59
  "@exodus/storage-memory": "^2.1.1",
60
- "@exodus/wallet-accounts": "^16.5.2",
60
+ "@exodus/wallet-accounts": "^16.8.1",
61
61
  "@types/minimalistic-assert": "^1.0.1",
62
62
  "redux": "^4.2.1"
63
63
  },
64
- "gitHead": "58fc182cc37da5908ac11c3fbabf7a7f30f3d833"
64
+ "gitHead": "a76a22c96445bcaa05e18de0e0c323cf9dd04cba"
65
65
  }
@@ -66,7 +66,9 @@ const createAssetSourceBaseActivitySelectorDefinition = {
66
66
 
67
67
  for (const group of groupedTxs) {
68
68
  const { tx, order, type: formatterType } = group
69
- const personalNote = getPersonalNoteByTxId(tx.txId)
69
+ const personalNote = getPersonalNoteByTxId
70
+ ? getPersonalNoteByTxId(tx.txId)
71
+ : undefined
70
72
  const formattedTx = formattersByType.get(formatterType)({
71
73
  asset: assets[tx.coinName],
72
74
  order,
@@ -108,7 +110,7 @@ const createAssetSourceBaseActivitySelectorDefinition = {
108
110
  { module: 'assets', selector: 'all' },
109
111
  { selector: 'createBatchedAssetSourceSelector' },
110
112
  { module: 'orders', selector: 'createOrdersInAccount' },
111
- { module: 'personalNotes', selector: 'get' },
113
+ { module: 'personalNotes', selector: 'get', optional: true },
112
114
  ],
113
115
  }
114
116
 
@@ -14,13 +14,13 @@ const collapseBatch = ({ batch, assets }) => {
14
14
  (sum, otherTx) => (otherTx.feeAmount ? sum.add(otherTx.feeAmount) : sum),
15
15
  (isToken ? asset.baseAsset : asset).currency.ZERO
16
16
  )
17
- const baseData = batch[0].data || {}
17
+ const baseData = batch[0].data || Object.create(null)
18
18
  const batchedIds = batch.map((tx) => tx.txId)
19
19
 
20
20
  const txJSON = batch[0].toJSON()
21
21
 
22
22
  return Tx.fromJSON(
23
- merge({}, txJSON, {
23
+ merge(Object.create(null), txJSON, {
24
24
  coinAmount: totalBatchValue,
25
25
  coinName: asset.name,
26
26
  feeAmount: totalBatchFee,
@@ -50,7 +50,7 @@ const createBatchedAssetSourceSelectorDefinition = {
50
50
  id: 'createBatchedAssetSourceSelector',
51
51
  dependencies: [
52
52
  { selector: 'createLimitedAssetSourceSelector' },
53
- { module: 'personalNotes', selector: 'withBatchId' },
53
+ { module: 'personalNotes', selector: 'withBatchId', optional: true },
54
54
  { module: 'assets', selector: 'all' },
55
55
  ],
56
56
  selectorFactory: (
@@ -60,16 +60,18 @@ const createBatchedAssetSourceSelectorDefinition = {
60
60
  ) =>
61
61
  memoize(
62
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
- ),
63
+ personalNotesWithBatchIdSelector.isFallback
64
+ ? createLimitedAssetSourceSelector({ assetName, walletAccount, limit })
65
+ : createSelector(
66
+ createLimitedAssetSourceSelector({ assetName, walletAccount, limit }),
67
+ personalNotesWithBatchIdSelector,
68
+ assetsSelector,
69
+ (txs, personalNotesWithBatchId, assets) => {
70
+ return personalNotesWithBatchId.size > 0
71
+ ? groupAndCollapseBatched({ txs, personalNotesWithBatchId, assets })
72
+ : txs
73
+ }
74
+ ),
73
75
  ({ assetName, walletAccount, limit }) => `${assetName}_${walletAccount}_${limit}`
74
76
  ),
75
77
  }