@exodus/activity-txs 4.1.3 → 4.1.4

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
+ ## [4.1.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.1.3...@exodus/activity-txs@4.1.4) (2024-05-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - type check in activity selector ([#7146](https://github.com/ExodusMovement/exodus-hydra/issues/7146)) ([37298c3](https://github.com/ExodusMovement/exodus-hydra/commit/37298c3cca33251085f6c62a0b378ead8350f755))
11
+
6
12
  ## [4.1.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.1.2...@exodus/activity-txs@4.1.3) (2024-05-27)
7
13
 
8
14
  **Note:** Version bump only for package @exodus/activity-txs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -61,5 +61,5 @@
61
61
  "@types/minimalistic-assert": "^1.0.1",
62
62
  "redux": "^4.2.1"
63
63
  },
64
- "gitHead": "5f3e666315d60ebef4051ebffa1518a193a7ec43"
64
+ "gitHead": "0f38b81a222ef8f9f9d41f6f560cd86d554269f4"
65
65
  }
@@ -8,10 +8,10 @@ export const formatUnindexedNftTx = ({ assetName, nftTx }) => {
8
8
  date: new Date(nftTx.date),
9
9
  assetName,
10
10
  type: TX_TYPES.NFT,
11
- id: `nft_${assetName}.${nftTx.txId}`,
11
+ id: `nft.${assetName}.${nftTx.txId}`,
12
12
  pending: false,
13
13
  failed: false,
14
- sent: nftTx.sent,
14
+ sent: nftTx.sent || false,
15
15
  received: !nftTx.sent,
16
16
  }),
17
17
  nft: nftTx,
@@ -26,10 +26,10 @@ export const formatNftTx = ({ tx, nft, assetName, ...rest }) => {
26
26
  date: tx.date,
27
27
  assetName,
28
28
  type: TX_TYPES.NFT,
29
- id: `nft_${assetName}.${tx.txId}`,
29
+ id: `nft.${assetName}.${tx.txId}`,
30
30
  pending: false,
31
- failed: tx.failed,
32
- sent: nft.sent,
31
+ failed: !!tx.failed,
32
+ sent: nft.sent || false,
33
33
  received: !nft.sent,
34
34
  }),
35
35
  nft,
@@ -43,7 +43,7 @@ const getSwapSharedProps = ({
43
43
  ...getSharedProps({
44
44
  txId,
45
45
  date,
46
- id: `swap_${assetName}.${txId}`,
46
+ id: `swap.${assetName}.${txId}`,
47
47
  assetName,
48
48
  type: getOrderType({ tx, order }),
49
49
  pending,
@@ -67,7 +67,7 @@ export const formatSwapActivity = ({ tx, order, personalNote }) =>
67
67
  txId: tx.txId,
68
68
  tx,
69
69
  order,
70
- failed: tx.failed || order.error,
70
+ failed: !!(tx.failed || order.error),
71
71
  displayAmount: order.toAmount.abs(),
72
72
  personalNote,
73
73
  pending: order.exodusStatus === FINAL_ORDER_STATUS.inProgress,
@@ -85,7 +85,7 @@ export const formatUnindexedOrder = ({ order, assetName: _assetName, personalNot
85
85
  assetName,
86
86
  txId,
87
87
  order,
88
- failed: order.error,
88
+ failed: !!order.error,
89
89
  displayAmount,
90
90
  personalNote,
91
91
  pending: order.exodusStatus === FINAL_ORDER_STATUS.inProgress,
@@ -29,7 +29,7 @@ export const formatTxActivity = ({ tx, asset, personalNote }) => {
29
29
  assetName: asset.name,
30
30
  type: getTxType({ tx }),
31
31
  pending: isPending(tx, asset),
32
- failed: tx.failed,
32
+ failed: !!tx.failed,
33
33
  sent: tx.sent,
34
34
  received: tx.received,
35
35
  }),
@@ -3,7 +3,6 @@ import typeforce from '@exodus/typeforce'
3
3
  export const getSharedProps = (opts) => {
4
4
  try {
5
5
  typeforce(
6
- opts,
7
6
  {
8
7
  txId: 'String',
9
8
  date: 'Date',
@@ -15,10 +14,11 @@ export const getSharedProps = (opts) => {
15
14
  sent: 'Boolean', // tx.uses tx.sent, nft uses nft.sent
16
15
  received: 'Boolean', // tx.uses tx.receive, nft uses !nft.sent
17
16
  },
17
+ opts,
18
18
  true // no extra props allowed
19
19
  )
20
- } catch {
21
- console.warn('activity item props dont pass validation', opts)
20
+ } catch (e) {
21
+ console.warn('activity item props dont pass validation in activity selector', e, opts)
22
22
  }
23
23
 
24
24
  return opts