@exodus/balances 13.3.0 → 13.3.2
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/module/index.js +4 -4
- package/package.json +11 -11
- package/redux/selectors/create-balance-selectors.js +2 -2
- package/redux/selectors/create-fuel-threshold.js +2 -2
- package/redux/selectors/create-unconfirmed-balance.js +2 -2
- package/redux/selectors/get-balance-for-field.js +2 -2
- package/redux/selectors/get-balance-selectors.js +1 -1
- package/redux/selectors/get-balances.js +2 -2
- package/redux/selectors/get-unconfirmed-balance.js +2 -2
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
|
+
## [13.3.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.3.1...@exodus/balances@13.3.2) (2024-09-13)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- log instead of throwing ([#9147](https://github.com/ExodusMovement/exodus-hydra/issues/9147)) ([499f002](https://github.com/ExodusMovement/exodus-hydra/commit/499f002ddb2d35fab3d7b18b59cac07476ea6ee0))
|
|
11
|
+
|
|
12
|
+
## [13.3.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.3.0...@exodus/balances@13.3.1) (2024-09-09)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @exodus/balances
|
|
15
|
+
|
|
6
16
|
## [13.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.2.3...@exodus/balances@13.3.0) (2024-08-21)
|
|
7
17
|
|
|
8
18
|
### Features
|
package/module/index.js
CHANGED
|
@@ -69,14 +69,14 @@ class Balances extends ExodusModule {
|
|
|
69
69
|
|
|
70
70
|
// sanitize args in case someone passes something sensitive, e.g. getBalance({ walletAccount, mnemonic })
|
|
71
71
|
// when only `{ walletAccount }` is expected
|
|
72
|
-
const
|
|
72
|
+
const reportAndSwallowErrors =
|
|
73
73
|
({ fn, name, sanitizeArgs = () => {} }) =>
|
|
74
74
|
async (...args) => {
|
|
75
75
|
try {
|
|
76
76
|
return await fn(...args)
|
|
77
77
|
} catch (error) {
|
|
78
78
|
this.emit('error', { fn: name, error, args: sanitizeArgs(...args) })
|
|
79
|
-
|
|
79
|
+
this._logger.error(error)
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -85,13 +85,13 @@ class Balances extends ExodusModule {
|
|
|
85
85
|
this.#handleTxLogUpdate = shareQueue(this.#handleTxLogUpdate)
|
|
86
86
|
this.#recompute = shareQueue(this.#recompute)
|
|
87
87
|
this.#onAssetsChanged = shareQueue(this.#onAssetsChanged)
|
|
88
|
-
this.#getBalancesForAssetSource =
|
|
88
|
+
this.#getBalancesForAssetSource = reportAndSwallowErrors({
|
|
89
89
|
fn: this.#getBalancesForAssetSource,
|
|
90
90
|
name: 'getBalancesForAssetSource',
|
|
91
91
|
sanitizeArgs: ({ walletAccount, assetName }) => ({ walletAccount, assetName }),
|
|
92
92
|
})
|
|
93
93
|
|
|
94
|
-
this.#setWalletAccounts =
|
|
94
|
+
this.#setWalletAccounts = reportAndSwallowErrors({
|
|
95
95
|
fn: this.#setWalletAccounts,
|
|
96
96
|
name: 'setWalletAccounts',
|
|
97
97
|
sanitizeArgs: (walletAccounts) => walletAccounts,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/balances",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.2",
|
|
4
4
|
"description": "Tracks crypto balances across enabled wallet accounts.",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "run -T exodus-test --jest",
|
|
9
|
-
"lint": "run -T eslint
|
|
9
|
+
"lint": "run -T eslint -c ../../eslint.config.mjs",
|
|
10
10
|
"lint:fix": "yarn lint --fix",
|
|
11
11
|
"format": "run -T prettier --write \"**/*.{json,md,yaml}\" --log-level warn",
|
|
12
12
|
"format:check": "run -T prettier --check \"**/*.{json,md,yaml}\" --log-level warn"
|
|
@@ -33,36 +33,36 @@
|
|
|
33
33
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Abalances"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@exodus/atoms": "^8.
|
|
36
|
+
"@exodus/atoms": "^8.1.1",
|
|
37
37
|
"@exodus/basic-utils": "^3.0.1",
|
|
38
38
|
"@exodus/core-selectors": "^3.0.0",
|
|
39
39
|
"@exodus/currency": "^5.0.2",
|
|
40
40
|
"@exodus/models": "^12.0.1",
|
|
41
41
|
"@exodus/module": "^1.3.0",
|
|
42
42
|
"@exodus/multi-account-redux": "^2.0.1",
|
|
43
|
-
"@exodus/redux-dependency-injection": "^4.0.
|
|
43
|
+
"@exodus/redux-dependency-injection": "^4.0.3",
|
|
44
44
|
"@exodus/typeforce": "^1.18.0",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
46
|
"make-concurrent": "^4.0.0",
|
|
47
47
|
"reselect": "^3.0.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@exodus/blockchain-metadata": "^
|
|
50
|
+
"@exodus/blockchain-metadata": "^15.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@exodus/assets": "^11.0.0",
|
|
54
54
|
"@exodus/assets-base": "^10.0.0",
|
|
55
|
-
"@exodus/assets-feature": "^5.11.
|
|
56
|
-
"@exodus/available-assets": "^8.
|
|
55
|
+
"@exodus/assets-feature": "^5.11.3",
|
|
56
|
+
"@exodus/available-assets": "^8.5.0",
|
|
57
57
|
"@exodus/bitcoin-meta": "^2.0.0",
|
|
58
|
-
"@exodus/blockchain-metadata": "^15.
|
|
58
|
+
"@exodus/blockchain-metadata": "^15.5.0",
|
|
59
59
|
"@exodus/ethereum-meta": "^2.0.0",
|
|
60
60
|
"@exodus/fee-data-monitors": "^4.3.0",
|
|
61
61
|
"@exodus/redux-dependency-injection": "workspace:^",
|
|
62
|
-
"@exodus/storage-memory": "
|
|
63
|
-
"@exodus/wallet-accounts": "^16.10.
|
|
62
|
+
"@exodus/storage-memory": "^2.2.0",
|
|
63
|
+
"@exodus/wallet-accounts": "^16.10.2",
|
|
64
64
|
"events": "^3.3.0",
|
|
65
65
|
"redux": "^4.2.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "de12d93c6e9cea90a07137a932dccd255226d92f"
|
|
68
68
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import { MY_STATE } from '@exodus/redux-dependency-injection'
|
|
3
3
|
import { createSelector } from 'reselect'
|
|
4
4
|
|
|
5
|
-
const { memoize } = lodash
|
|
5
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
6
6
|
|
|
7
7
|
const createBalanceSelectorFactory = ({ field, id }) => {
|
|
8
8
|
const selectorFactory = (selfSelector) =>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import { createSelector } from 'reselect'
|
|
3
3
|
import { isNumberUnit } from '@exodus/currency'
|
|
4
4
|
|
|
5
|
-
const { memoize } = lodash
|
|
5
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
6
6
|
|
|
7
7
|
const selectorFactory = (getFeeDataSelector, assetsSelector) =>
|
|
8
8
|
memoize((assetName) =>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import { createSelector } from 'reselect'
|
|
3
3
|
import { getUnconfirmedBalance } from './get-unconfirmed-balance.js'
|
|
4
4
|
|
|
5
|
-
const { memoize } = lodash
|
|
5
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
6
6
|
|
|
7
7
|
const selectorFactory = (assetsSelector, createAssetSourceSelector) =>
|
|
8
8
|
memoize(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import defaultConfig from '../../default-config.js'
|
|
3
3
|
|
|
4
|
-
const { memoize } = lodash
|
|
4
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
5
5
|
|
|
6
6
|
const { balanceFields } = defaultConfig
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import lodash from 'lodash'
|
|
2
2
|
|
|
3
|
-
const { memoize } = lodash // eslint-disable-line @exodus/
|
|
3
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
4
4
|
|
|
5
5
|
const createResultFunction = (field) => (getBalanceForField) =>
|
|
6
6
|
memoize(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import { createSelector } from 'reselect'
|
|
3
3
|
import { MY_STATE } from '@exodus/redux-dependency-injection'
|
|
4
4
|
|
|
5
|
-
const { memoize } = lodash
|
|
5
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
6
6
|
|
|
7
7
|
const selectorFactory = (selfSelector) =>
|
|
8
8
|
createSelector(selfSelector, (balances) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import lodash from 'lodash'
|
|
1
|
+
import lodash from 'lodash'
|
|
2
2
|
import { createSelector } from 'reselect'
|
|
3
3
|
|
|
4
|
-
const { memoize } = lodash
|
|
4
|
+
const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
|
|
5
5
|
|
|
6
6
|
export const getUnconfirmedBalance = ({ asset, txs }) => {
|
|
7
7
|
let result = asset.currency.ZERO
|