@exodus/balances 13.11.0 → 13.13.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 +12 -0
- package/module/index.js +12 -5
- package/package.json +3 -2
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
|
+
## [13.13.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.12.0...@exodus/balances@13.13.0) (2025-07-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat: track errors from balances module (#13237)
|
|
11
|
+
|
|
12
|
+
## [13.12.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.11.0...@exodus/balances@13.12.0) (2025-07-10)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- feat: update basic utils in balances (#13183)
|
|
17
|
+
|
|
6
18
|
## [13.11.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.10.0...@exodus/balances@13.11.0) (2025-07-09)
|
|
7
19
|
|
|
8
20
|
### Features
|
package/module/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { safeString } from '@exodus/safe-string'
|
|
1
2
|
import { isNumberUnit } from '@exodus/currency'
|
|
2
3
|
import { TxSet } from '@exodus/models'
|
|
3
4
|
import lodash from 'lodash'
|
|
@@ -46,7 +47,7 @@ class Balances {
|
|
|
46
47
|
#enabledWalletAccountsAtom
|
|
47
48
|
#loaded = false
|
|
48
49
|
#subscriptions = []
|
|
49
|
-
|
|
50
|
+
#errorTracking
|
|
50
51
|
constructor({
|
|
51
52
|
assetsModule,
|
|
52
53
|
availableAssetNamesAtom,
|
|
@@ -57,6 +58,7 @@ class Balances {
|
|
|
57
58
|
txLogsAtom,
|
|
58
59
|
accountStatesAtom,
|
|
59
60
|
feeDataAtom,
|
|
61
|
+
errorTracking,
|
|
60
62
|
}) {
|
|
61
63
|
this.#logger = logger
|
|
62
64
|
this.#assetsModule = assetsModule
|
|
@@ -68,6 +70,7 @@ class Balances {
|
|
|
68
70
|
this.#txLogsAtom = txLogsAtom
|
|
69
71
|
this.#feeDataAtom = feeDataAtom
|
|
70
72
|
this.#enabledWalletAccountsAtom = enabledWalletAccountsAtom
|
|
73
|
+
this.#errorTracking = errorTracking
|
|
71
74
|
|
|
72
75
|
const shareQueue =
|
|
73
76
|
(fn) =>
|
|
@@ -78,12 +81,12 @@ class Balances {
|
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
const swallowErrors =
|
|
81
|
-
(fn) =>
|
|
84
|
+
(fn, method) =>
|
|
82
85
|
async (...args) => {
|
|
83
86
|
try {
|
|
84
87
|
return await fn(...args)
|
|
85
88
|
} catch (error) {
|
|
86
|
-
this.#
|
|
89
|
+
this.#errorTracking.track({ error: new Error(method, { cause: error }) })
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
92
|
|
|
@@ -93,8 +96,11 @@ class Balances {
|
|
|
93
96
|
this.#handleFeeDataUpdate = shareQueue(this.#handleFeeDataUpdate)
|
|
94
97
|
this.#recompute = shareQueue(this.#recompute)
|
|
95
98
|
this.#onAssetsChanged = shareQueue(this.#onAssetsChanged)
|
|
96
|
-
this.#getBalancesForAssetSource = swallowErrors(
|
|
97
|
-
|
|
99
|
+
this.#getBalancesForAssetSource = swallowErrors(
|
|
100
|
+
this.#getBalancesForAssetSource,
|
|
101
|
+
safeString`getBalancesForAssetSource`
|
|
102
|
+
)
|
|
103
|
+
this.#setWalletAccounts = swallowErrors(this.#setWalletAccounts, safeString`setWalletAccounts`)
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
load = async () => {
|
|
@@ -426,6 +432,7 @@ const balancesDefinition = {
|
|
|
426
432
|
'txLogsAtom',
|
|
427
433
|
'accountStatesAtom',
|
|
428
434
|
'feeDataAtom',
|
|
435
|
+
'errorTracking',
|
|
429
436
|
],
|
|
430
437
|
public: true,
|
|
431
438
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/balances",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.13.0",
|
|
4
4
|
"description": "Tracks crypto balances across enabled wallet accounts.",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@exodus/models": "^12.0.1",
|
|
42
42
|
"@exodus/multi-account-redux": "^2.0.1",
|
|
43
43
|
"@exodus/redux-dependency-injection": "^4.0.3",
|
|
44
|
+
"@exodus/safe-string": "^1.1.0",
|
|
44
45
|
"@exodus/typeforce": "^1.18.0",
|
|
45
46
|
"@exodus/zod": "^3.24.2",
|
|
46
47
|
"lodash": "^4.17.21",
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"publishConfig": {
|
|
68
69
|
"access": "public"
|
|
69
70
|
},
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "f2359d974180d0af6e116f209da34dbee4ef8cff"
|
|
71
72
|
}
|