@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 +6 -0
- package/package.json +2 -2
- package/redux/utils/activity-formatters/format-nft.js +5 -5
- package/redux/utils/activity-formatters/format-swap-activity.js +3 -3
- package/redux/utils/activity-formatters/format-tx-activity.js +1 -1
- package/redux/utils/activity-formatters/get-shared-props.js +3 -3
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
|
+
"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": "
|
|
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: `
|
|
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: `
|
|
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: `
|
|
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,
|
|
@@ -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
|