@exodus/balances 12.0.0 → 12.0.1
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/atoms/balances.js +1 -0
- package/package.json +5 -5
- package/redux/index.js +5 -6
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
|
+
## [12.0.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@12.0.0...@exodus/balances@12.0.1) (2023-12-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **balances:** reducer changes computation when balances not loaded ([#5008](https://github.com/ExodusMovement/exodus-hydra/issues/5008))08) ([01e50c9](https://github.com/ExodusMovement/exodus-hydra/commit/01e50c9ef852b542855aad8abf25db3eaeca76a0))
|
|
11
|
+
|
|
6
12
|
## [12.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@11.2.2...@exodus/balances@12.0.0) (2023-11-23)
|
|
7
13
|
|
|
8
14
|
### ⚠ BREAKING CHANGES
|
package/atoms/balances.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/balances",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Tracks crypto balances across enabled wallet accounts.",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Abalances"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@exodus/atoms": "^
|
|
32
|
+
"@exodus/atoms": "^7.0.0",
|
|
33
33
|
"@exodus/basic-utils": "^2.1.0",
|
|
34
34
|
"@exodus/currency": "^2.1.2",
|
|
35
35
|
"@exodus/module": "^1.1.0",
|
|
36
|
-
"@exodus/multi-account-redux": "^2.0.
|
|
36
|
+
"@exodus/multi-account-redux": "^2.0.1",
|
|
37
37
|
"@exodus/typeforce": "^1.18.0",
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
39
|
"make-concurrent": "^4.0.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@exodus/models": "^10.1.0",
|
|
53
53
|
"@exodus/redux-dependency-injection": "^3.0.0",
|
|
54
54
|
"@exodus/storage-memory": "*",
|
|
55
|
-
"@exodus/wallet-accounts": "^
|
|
55
|
+
"@exodus/wallet-accounts": "^15.0.0",
|
|
56
56
|
"eslint": "^8.44.0",
|
|
57
57
|
"events": "^3.3.0",
|
|
58
58
|
"jest": "^29.1.2",
|
|
59
59
|
"redux": "^4.2.1"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "be0d353e5d42bd166526ac72d256b2b4c7de36a9"
|
|
62
62
|
}
|
package/redux/index.js
CHANGED
|
@@ -38,15 +38,14 @@ const balancesReduxDefinition = {
|
|
|
38
38
|
initialState,
|
|
39
39
|
eventReducers: {
|
|
40
40
|
balances: (state, payload) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const { hasBalance, ...walletAccountBalances } = state
|
|
42
|
+
const balancesLoaded = Object.keys(walletAccountBalances).every((value) => value.loaded)
|
|
43
|
+
|
|
44
|
+
if (balancesLoaded && payload.changes && Object.keys(payload.changes).length > 0) {
|
|
43
45
|
return mergeChanges(state, payload.changes)
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
return {
|
|
47
|
-
hasBalance: state.hasBalance,
|
|
48
|
-
...setAccounts(state, payload.balances),
|
|
49
|
-
}
|
|
48
|
+
return { hasBalance, ...setAccounts(state, payload.balances) }
|
|
50
49
|
},
|
|
51
50
|
hasBalance: (state, payload) => ({
|
|
52
51
|
...state,
|