@exodus/fiat-balances 12.1.2 → 12.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
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
|
+
## [12.1.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@12.1.3...@exodus/fiat-balances@12.1.4) (2024-09-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **fiat-balances:** adjust optimistic balances with fallback selector ([#9298](https://github.com/ExodusMovement/exodus-hydra/issues/9298)) ([c67bc9e](https://github.com/ExodusMovement/exodus-hydra/commit/c67bc9e71be3002d81e09c28f4b4daa9425ebbc7))
|
|
11
|
+
|
|
12
|
+
## [12.1.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@12.1.2...@exodus/fiat-balances@12.1.3) (2024-09-09)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @exodus/fiat-balances
|
|
15
|
+
|
|
6
16
|
## [12.1.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@12.1.1...@exodus/fiat-balances@12.1.2) (2024-08-26)
|
|
7
17
|
|
|
8
18
|
### Performance Improvements
|
package/module/fiat-balances.js
CHANGED
|
@@ -117,11 +117,10 @@ class FiatBalances extends ExodusModule {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
const fiatValue = this.#convertToFiat({ assetName, value: balance })
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
byAssetSource[walletAccount][assetName][field] =
|
|
122
122
|
byAssetSource[walletAccount][assetName][field].add(fiatValue)
|
|
123
123
|
|
|
124
|
-
// eslint-disable-next-line standard/computed-property-even-spacing
|
|
125
124
|
byBaseAssetSource[walletAccount][baseAssetName][field] =
|
|
126
125
|
byBaseAssetSource[walletAccount][baseAssetName][field].add(fiatValue)
|
|
127
126
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/fiat-balances",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.4",
|
|
4
4
|
"description": "Track asset and portfolio fiat balances based on changes in crypto balances and the user's preferred fiat currency",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "run -T exodus-test --jest --esbuild",
|
|
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"
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Afiat-balances"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@exodus/atoms": "^8.
|
|
36
|
-
"@exodus/basic-utils": "^
|
|
37
|
-
"@exodus/currency": "^
|
|
35
|
+
"@exodus/atoms": "^8.1.1",
|
|
36
|
+
"@exodus/basic-utils": "^3.0.1",
|
|
37
|
+
"@exodus/currency": "^5.0.2",
|
|
38
38
|
"@exodus/fiat-currencies": "^1.1.0",
|
|
39
39
|
"@exodus/formatting": "^6.0.0",
|
|
40
40
|
"@exodus/module": "^1.1.0",
|
|
@@ -46,23 +46,23 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@exodus/assets": "^9.1.0",
|
|
48
48
|
"@exodus/assets-base": "^8.1.17",
|
|
49
|
-
"@exodus/assets-feature": "^5.11.
|
|
49
|
+
"@exodus/assets-feature": "^5.11.3",
|
|
50
50
|
"@exodus/available-assets": "^8.5.0",
|
|
51
|
-
"@exodus/balances": "^13.3.
|
|
52
|
-
"@exodus/blockchain-metadata": "^15.
|
|
51
|
+
"@exodus/balances": "^13.3.2",
|
|
52
|
+
"@exodus/blockchain-metadata": "^15.5.0",
|
|
53
53
|
"@exodus/combined-assets-meta": "^1.3.0",
|
|
54
|
-
"@exodus/enabled-assets": "^10.7.
|
|
54
|
+
"@exodus/enabled-assets": "^10.7.1",
|
|
55
55
|
"@exodus/favorite-assets": "^2.4.3",
|
|
56
56
|
"@exodus/fee-data-monitors": "^4.3.0",
|
|
57
57
|
"@exodus/locale": "^2.2.2",
|
|
58
|
-
"@exodus/models": "^
|
|
59
|
-
"@exodus/rates-monitor": "^4.4.
|
|
60
|
-
"@exodus/redux-dependency-injection": "^4.0.
|
|
58
|
+
"@exodus/models": "^12.0.1",
|
|
59
|
+
"@exodus/rates-monitor": "^4.4.1",
|
|
60
|
+
"@exodus/redux-dependency-injection": "^4.0.3",
|
|
61
61
|
"@exodus/solana-meta": "^1.0.4",
|
|
62
62
|
"@exodus/storage-memory": "^2.2.0",
|
|
63
|
-
"@exodus/wallet-accounts": "^16.
|
|
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": "625598e9f323425bebaaf163fa42e2b3be91b9e3"
|
|
68
68
|
}
|
|
@@ -15,7 +15,7 @@ const selectorFactory =
|
|
|
15
15
|
const getExtraProps = (asset) => {
|
|
16
16
|
const fiatValue = fiatBalances?.[asset.name] || fiatCurrency.ZERO
|
|
17
17
|
return {
|
|
18
|
-
balance: balances[asset] || asset.currency.ZERO,
|
|
18
|
+
balance: balances?.[asset] || asset.currency.ZERO,
|
|
19
19
|
fiatValue,
|
|
20
20
|
formattedFiatValue: formatFiat(fiatValue, { adaptiveFraction: true }),
|
|
21
21
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import sortAssetsSelectorFactoryCreator from '../helpers/sort-assets-selector-factory-creator'
|
|
2
2
|
|
|
3
|
+
const noBalances = Object.freeze(Object.create(null))
|
|
4
|
+
const noBalancesSelector = () => () => noBalances
|
|
5
|
+
|
|
3
6
|
const createSelectorFactory =
|
|
4
7
|
({ ignoreMarketCapAssets }) =>
|
|
5
8
|
(
|
|
@@ -11,7 +14,9 @@ const createSelectorFactory =
|
|
|
11
14
|
(assetsListSelector) =>
|
|
12
15
|
sortAssetsSelectorFactoryCreator({
|
|
13
16
|
fiatBalancesByAssetSourceSelector,
|
|
14
|
-
getAccountAssetsBalanceSelector
|
|
17
|
+
getAccountAssetsBalanceSelector: getAccountAssetsBalanceSelector.isFallback
|
|
18
|
+
? noBalancesSelector
|
|
19
|
+
: getAccountAssetsBalanceSelector,
|
|
15
20
|
ratesSelector,
|
|
16
21
|
getIsFavoriteAssetSelector,
|
|
17
22
|
ignoreMarketCapAssets,
|