@exodus/fiat-balances 10.12.4 → 10.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 +6 -0
- package/index.js +2 -0
- package/package.json +7 -6
- package/report/index.js +25 -0
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
|
+
## [10.13.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@10.12.4...@exodus/fiat-balances@10.13.0) (2024-07-29)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **fiat-balances:** add fiat-balances report node ([#8103](https://github.com/ExodusMovement/exodus-hydra/issues/8103)) ([e48da5f](https://github.com/ExodusMovement/exodus-hydra/commit/e48da5f31e2162259ae04fb6ba282fbcaa6076f8))
|
|
11
|
+
|
|
6
12
|
## [10.12.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@10.12.3...@exodus/fiat-balances@10.12.4) (2024-07-25)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from './atoms'
|
|
7
7
|
import fiatBalancesPluginDefinition from './plugin'
|
|
8
8
|
import trackNonDustAssetsNamesPluginDefinition from './plugin/track-non-dust-asset-names'
|
|
9
|
+
import fiatBalancesReportDefinition from './report'
|
|
9
10
|
|
|
10
11
|
const DEFAULT_BALANCE_FIELDS = ['balance']
|
|
11
12
|
|
|
@@ -33,6 +34,7 @@ const fiatBalances = (
|
|
|
33
34
|
},
|
|
34
35
|
{ definition: fiatBalancesAtomDefinition },
|
|
35
36
|
{ definition: fiatBalancesPluginDefinition },
|
|
37
|
+
{ definition: fiatBalancesReportDefinition },
|
|
36
38
|
{ definition: trackNonDustAssetsNamesPluginDefinition, config: nonDustAssets },
|
|
37
39
|
{ definition: nonDustBalanceAssetNamesAtomDefinition },
|
|
38
40
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/fiat-balances",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.13.0",
|
|
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",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"redux",
|
|
18
18
|
"atoms",
|
|
19
19
|
"plugin",
|
|
20
|
+
"report",
|
|
20
21
|
"shared",
|
|
21
22
|
"README.md",
|
|
22
23
|
"CHANGELOG.md",
|
|
@@ -45,23 +46,23 @@
|
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@exodus/assets": "^9.1.0",
|
|
47
48
|
"@exodus/assets-base": "^8.1.17",
|
|
48
|
-
"@exodus/assets-feature": "^5.8.
|
|
49
|
-
"@exodus/available-assets": "^8.4.
|
|
49
|
+
"@exodus/assets-feature": "^5.8.3",
|
|
50
|
+
"@exodus/available-assets": "^8.4.1",
|
|
50
51
|
"@exodus/balances": "^13.2.3",
|
|
51
52
|
"@exodus/blockchain-metadata": "^15.3.5",
|
|
52
53
|
"@exodus/combined-assets-meta": "^1.3.0",
|
|
53
|
-
"@exodus/enabled-assets": "^10.5.
|
|
54
|
+
"@exodus/enabled-assets": "^10.5.2",
|
|
54
55
|
"@exodus/favorite-assets": "^2.4.3",
|
|
55
56
|
"@exodus/fee-data-monitors": "^4.2.1",
|
|
56
57
|
"@exodus/locale": "^2.2.2",
|
|
57
58
|
"@exodus/models": "^8.9.0",
|
|
58
59
|
"@exodus/rates-monitor": "^4.3.3",
|
|
59
|
-
"@exodus/redux-dependency-injection": "^
|
|
60
|
+
"@exodus/redux-dependency-injection": "^4.0.0",
|
|
60
61
|
"@exodus/solana-meta": "^1.0.4",
|
|
61
62
|
"@exodus/storage-memory": "^2.1.1",
|
|
62
63
|
"@exodus/wallet-accounts": "^16.8.2",
|
|
63
64
|
"events": "^3.3.0",
|
|
64
65
|
"redux": "^4.2.1"
|
|
65
66
|
},
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "d309b0209d3b7d679984c3f5315cab2104bd6ddb"
|
|
67
68
|
}
|
package/report/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { mapValues } from '@exodus/basic-utils'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* sample report
|
|
5
|
+
* {
|
|
6
|
+
* wallet_account_1: '50 USD',
|
|
7
|
+
* wallet_account_1: '0 USD'
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
const fiatBalancesReportDefinition = {
|
|
11
|
+
type: 'report',
|
|
12
|
+
id: 'fiatBalancesReport',
|
|
13
|
+
factory: ({ fiatBalancesAtom }) => ({
|
|
14
|
+
namespace: 'fiatBalances',
|
|
15
|
+
export: async () => {
|
|
16
|
+
const result = await fiatBalancesAtom.get()
|
|
17
|
+
return mapValues(result.balances.byWalletAccount, ({ balance }) =>
|
|
18
|
+
balance.toDefaultString({ unit: true })
|
|
19
|
+
)
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
dependencies: ['fiatBalancesAtom'],
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default fiatBalancesReportDefinition
|