@exodus/activity-txs 5.0.2 → 5.1.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 +10 -0
- package/atoms/activity-txs.js +4 -1
- package/index.js +2 -1
- package/package.json +5 -4
- package/redux/utils/activity-formatters/format-nft.js +27 -5
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
|
+
## [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
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat: update all consumers to use safe strings for error namespaces (#14429)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- fix: update NFT transaction sent status calculation (#14359)
|
|
15
|
+
|
|
6
16
|
## [5.0.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@5.0.1...@exodus/activity-txs@5.0.2) (2025-11-05)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/atoms/activity-txs.js
CHANGED
|
@@ -147,7 +147,10 @@ const createActivityTxsAtom = ({
|
|
|
147
147
|
|
|
148
148
|
return [assetName, activityTxs]
|
|
149
149
|
} catch (e) {
|
|
150
|
-
errorTracking.track({
|
|
150
|
+
errorTracking.track({
|
|
151
|
+
error: e,
|
|
152
|
+
context: { assetName },
|
|
153
|
+
})
|
|
151
154
|
logger.warn(`failed to get activity txs for asset: ${assetName}`, e)
|
|
152
155
|
return [assetName, []]
|
|
153
156
|
}
|
package/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { activityTxsAtomDefinition } from './atoms/index.js'
|
|
2
2
|
import activityTxsPluginDefinition from './plugin/index.js'
|
|
3
|
+
import { safeString } from '@exodus/safe-string'
|
|
3
4
|
|
|
4
5
|
const activityTxs = () => ({
|
|
5
|
-
id:
|
|
6
|
+
id: safeString`activityTxs`,
|
|
6
7
|
definitions: [
|
|
7
8
|
{
|
|
8
9
|
definition: activityTxsAtomDefinition,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/activity-txs",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "The activity-txs feature",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@exodus/core-selectors": "^4.0.0",
|
|
38
38
|
"@exodus/models": "^12.0.1",
|
|
39
39
|
"@exodus/multi-account-redux": "^2.0.1",
|
|
40
|
+
"@exodus/safe-string": "^1.3.0",
|
|
40
41
|
"@exodus/typeforce": "^1.19.0",
|
|
41
42
|
"lodash": "^4.17.21",
|
|
42
43
|
"minimalistic-assert": "^1.0.1",
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
"@exodus/available-assets": "^8.8.0",
|
|
50
51
|
"@exodus/bitcoin-plugin": "^1.4.2",
|
|
51
52
|
"@exodus/connected-origins": "^4.3.0",
|
|
52
|
-
"@exodus/error-tracking": "^3.
|
|
53
|
-
"@exodus/fiat-ramp": "^15.
|
|
53
|
+
"@exodus/error-tracking": "^3.3.0",
|
|
54
|
+
"@exodus/fiat-ramp": "^15.6.0",
|
|
54
55
|
"@exodus/logger": "^1.2.3",
|
|
55
56
|
"@exodus/nfts": "^9.6.1",
|
|
56
57
|
"@exodus/orders": "^5.5.2",
|
|
@@ -64,5 +65,5 @@
|
|
|
64
65
|
"access": "public",
|
|
65
66
|
"provenance": false
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "c024e571066175633a8803171c93ed122d6dcc01"
|
|
68
69
|
}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
import { getSharedProps } from './get-shared-props.js'
|
|
2
1
|
import { TX_TYPES } from '../../constants/tx-types.js'
|
|
3
2
|
import { isPending } from './format-tx-activity.js'
|
|
3
|
+
import { getSharedProps } from './get-shared-props.js'
|
|
4
|
+
|
|
5
|
+
const determineNftSent = (nft, tx) => {
|
|
6
|
+
if (tx) {
|
|
7
|
+
if (tx.received !== undefined) {
|
|
8
|
+
return !tx.received
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (tx.coinAmount) {
|
|
12
|
+
return !tx.coinAmount.isPositive
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (nft.sent !== undefined) {
|
|
17
|
+
return nft.sent
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return false
|
|
21
|
+
}
|
|
4
22
|
|
|
5
23
|
export const formatUnindexedNftTx = ({ assetName, nftTx }) => {
|
|
24
|
+
const sent = nftTx.sent === undefined ? false : nftTx.sent
|
|
25
|
+
|
|
6
26
|
return {
|
|
7
27
|
...getSharedProps({
|
|
8
28
|
txId: nftTx.txId,
|
|
@@ -12,14 +32,16 @@ export const formatUnindexedNftTx = ({ assetName, nftTx }) => {
|
|
|
12
32
|
id: `nft.${assetName}.${nftTx.txId}`,
|
|
13
33
|
pending: false,
|
|
14
34
|
failed: false,
|
|
15
|
-
sent
|
|
16
|
-
received: !
|
|
35
|
+
sent,
|
|
36
|
+
received: !sent,
|
|
17
37
|
}),
|
|
18
38
|
nft: nftTx,
|
|
19
39
|
}
|
|
20
40
|
}
|
|
21
41
|
|
|
22
42
|
export const formatNftTx = ({ tx, nft, assetName, asset, ...rest }) => {
|
|
43
|
+
const sent = determineNftSent(nft, tx)
|
|
44
|
+
|
|
23
45
|
return {
|
|
24
46
|
...rest,
|
|
25
47
|
...getSharedProps({
|
|
@@ -30,8 +52,8 @@ export const formatNftTx = ({ tx, nft, assetName, asset, ...rest }) => {
|
|
|
30
52
|
id: `nft.${assetName}.${tx.txId}`,
|
|
31
53
|
pending: isPending(tx, asset),
|
|
32
54
|
failed: !!tx.failed,
|
|
33
|
-
sent
|
|
34
|
-
received: !
|
|
55
|
+
sent,
|
|
56
|
+
received: !sent,
|
|
35
57
|
}),
|
|
36
58
|
nft,
|
|
37
59
|
tx,
|