@exodus/fiat-balances 12.5.2 → 13.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 +20 -0
- package/index.js +62 -64
- package/module/fiat-balances.js +1 -3
- package/package.json +6 -6
- package/plugin/analytics.js +9 -1
- package/plugin/index.js +3 -64
- package/plugin/lifecycle.js +55 -0
- package/plugin/track-non-dust-asset-names.js +6 -8
- package/redux/index.js +1 -1
- package/redux/selectors/helpers/sort-assets-selector-factory-creator.js +18 -4
- package/shared/constants.js +16 -0
- package/shared/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.0.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@13.0.0...@exodus/fiat-balances@13.0.1) (2025-01-02)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- fix: memoize selector result (#10901)
|
|
11
|
+
|
|
12
|
+
## [13.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@12.5.2...@exodus/fiat-balances@13.0.0) (2024-12-23)
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
- **fiat-balances:** forward configs from feature (#10818)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- feat(fiat-balances)!: forward configs from feature (#10818)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- fix: optimistic loaded state (#10920)
|
|
25
|
+
|
|
6
26
|
## [12.5.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@12.5.1...@exodus/fiat-balances@12.5.2) (2024-12-06)
|
|
7
27
|
|
|
8
28
|
### License
|
package/index.js
CHANGED
|
@@ -4,77 +4,75 @@ import {
|
|
|
4
4
|
nonDustBalanceAssetNamesAtomDefinition,
|
|
5
5
|
optimisticFiatBalancesAtomDefinition,
|
|
6
6
|
} from './atoms'
|
|
7
|
-
import fiatBalancesPluginDefinition,
|
|
7
|
+
import { fiatBalancesPluginDefinition, fiatBalancesAnalyticsPluginDefinition } from './plugin'
|
|
8
8
|
import trackNonDustAssetsNamesPluginDefinition from './plugin/track-non-dust-asset-names'
|
|
9
9
|
import fiatBalancesReportDefinition from './report'
|
|
10
|
-
|
|
11
|
-
const DEFAULT_BALANCE_FIELDS = ['balance']
|
|
10
|
+
import { defaultConfig, defaultNonDustAssetsConfig } from './shared'
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
|
-
* @param {object}
|
|
15
|
-
* @param {boolean} [
|
|
16
|
-
* @param {string[]} [
|
|
17
|
-
* @param {object} [
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {object} [opts.nonDustAssets.balanceThresholdByChainUsd]
|
|
20
|
-
* @param {Array} [opts.assetsToTrackForBalances]
|
|
21
|
-
* @param {import('@exodus/fiat-currencies').Unit} [opts.nonDustAssets.defaultBalanceThresholdUsd]
|
|
13
|
+
* @param {object} config
|
|
14
|
+
* @param {boolean} [config.optimistic]
|
|
15
|
+
* @param {string[]} [config.balanceFields]
|
|
16
|
+
* @param {object} [config.nonDustAssets]
|
|
17
|
+
* @param {Array} [config.assetsToTrackForBalances]
|
|
22
18
|
*/
|
|
23
|
-
const fiatBalances = (
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
definition: fiatBalancesDefinition,
|
|
39
|
-
config: {
|
|
40
|
-
balanceFields,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{ definition: fiatBalancesAtomDefinition },
|
|
44
|
-
{ definition: fiatBalancesPluginDefinition },
|
|
45
|
-
{ definition: fiatBalancesReportDefinition },
|
|
46
|
-
{
|
|
47
|
-
definition: trackNonDustAssetsNamesPluginDefinition,
|
|
48
|
-
config: { balanceThresholdsUsd, balanceThresholdByChainUsd, defaultBalanceThresholdUsd },
|
|
49
|
-
},
|
|
50
|
-
{ definition: nonDustBalanceAssetNamesAtomDefinition },
|
|
51
|
-
{
|
|
52
|
-
if: optimistic,
|
|
53
|
-
definition: optimisticFiatBalancesAtomDefinition,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
if: optimistic,
|
|
57
|
-
definition: {
|
|
58
|
-
...fiatBalancesDefinition,
|
|
59
|
-
id: 'optimisticFiatBalances',
|
|
19
|
+
const fiatBalances = (config = Object.create(null)) => {
|
|
20
|
+
const { optimistic, nonDustAssets, balanceFields, assetsToTrackForBalances } = {
|
|
21
|
+
...defaultConfig,
|
|
22
|
+
...config,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
id: 'fiatBalances',
|
|
27
|
+
definitions: [
|
|
28
|
+
{
|
|
29
|
+
definition: fiatBalancesDefinition,
|
|
30
|
+
config: {
|
|
31
|
+
balanceFields,
|
|
32
|
+
},
|
|
60
33
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
34
|
+
{ definition: fiatBalancesAtomDefinition },
|
|
35
|
+
{ definition: fiatBalancesPluginDefinition },
|
|
36
|
+
{ definition: fiatBalancesReportDefinition },
|
|
37
|
+
{
|
|
38
|
+
definition: trackNonDustAssetsNamesPluginDefinition,
|
|
39
|
+
config: {
|
|
40
|
+
...defaultNonDustAssetsConfig,
|
|
41
|
+
...nonDustAssets,
|
|
65
42
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
43
|
+
},
|
|
44
|
+
{ definition: nonDustBalanceAssetNamesAtomDefinition },
|
|
45
|
+
{
|
|
46
|
+
if: optimistic,
|
|
47
|
+
definition: optimisticFiatBalancesAtomDefinition,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
if: optimistic,
|
|
51
|
+
definition: {
|
|
52
|
+
...fiatBalancesDefinition,
|
|
53
|
+
id: 'optimisticFiatBalances',
|
|
54
|
+
config: {
|
|
55
|
+
balanceFields,
|
|
56
|
+
},
|
|
69
57
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
58
|
+
aliases: [
|
|
59
|
+
{
|
|
60
|
+
implementationId: 'optimisticBalancesAtom',
|
|
61
|
+
interfaceId: 'balancesAtom',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
implementationId: 'optimisticFiatBalancesAtom',
|
|
65
|
+
interfaceId: 'fiatBalancesAtom',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
if: { registered: ['analytics'] },
|
|
71
|
+
definition: fiatBalancesAnalyticsPluginDefinition,
|
|
72
|
+
config: { assetsToTrackForBalances },
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
}
|
|
76
|
+
}
|
|
79
77
|
|
|
80
78
|
export default fiatBalances
|
package/module/fiat-balances.js
CHANGED
|
@@ -8,8 +8,6 @@ import { getCreateConversion } from '../shared/get-create-conversion.js'
|
|
|
8
8
|
// not super efficient, so we're assuming small objects, like { [walletAccount]: xyz }
|
|
9
9
|
const areKeysSame = (a, b) => isEqual(Object.keys(a).sort(), Object.keys(b).sort())
|
|
10
10
|
|
|
11
|
-
const MODULE_ID = 'fiatBalances'
|
|
12
|
-
|
|
13
11
|
const cloneBalances = (balances) =>
|
|
14
12
|
cloneDeepWith(balances, (val) => {
|
|
15
13
|
if (isNumberUnit(val)) return val
|
|
@@ -260,7 +258,7 @@ class FiatBalances {
|
|
|
260
258
|
const createFiatBalances = (...args) => new FiatBalances(...args)
|
|
261
259
|
|
|
262
260
|
const fiatBalancesDefinition = {
|
|
263
|
-
id:
|
|
261
|
+
id: 'fiatBalances',
|
|
264
262
|
type: 'module',
|
|
265
263
|
factory: createFiatBalances,
|
|
266
264
|
dependencies: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/fiat-balances",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.1",
|
|
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": "MIT",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@exodus/assets": "^9.1.0",
|
|
46
46
|
"@exodus/assets-base": "^8.1.17",
|
|
47
|
-
"@exodus/assets-feature": "^
|
|
47
|
+
"@exodus/assets-feature": "^6.0.0",
|
|
48
48
|
"@exodus/available-assets": "^8.7.0",
|
|
49
49
|
"@exodus/balances": "^13.5.1",
|
|
50
|
-
"@exodus/blockchain-metadata": "^15.7.
|
|
50
|
+
"@exodus/blockchain-metadata": "^15.7.1",
|
|
51
51
|
"@exodus/combined-assets-meta": "^1.3.0",
|
|
52
|
-
"@exodus/enabled-assets": "^10.8.
|
|
52
|
+
"@exodus/enabled-assets": "^10.8.2",
|
|
53
53
|
"@exodus/favorite-assets": "^2.4.3",
|
|
54
54
|
"@exodus/fee-data-monitors": "^5.0.3",
|
|
55
55
|
"@exodus/models": "^12.3.0",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@exodus/redux-dependency-injection": "^4.1.1",
|
|
58
58
|
"@exodus/solana-meta": "^1.0.4",
|
|
59
59
|
"@exodus/storage-memory": "^2.2.2",
|
|
60
|
-
"@exodus/wallet-accounts": "^17.1.
|
|
60
|
+
"@exodus/wallet-accounts": "^17.1.3",
|
|
61
61
|
"events": "^3.3.0",
|
|
62
62
|
"redux": "^4.2.1"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1f7245d8d7fa66a2f06faabac3d6380bea289e12"
|
|
68
68
|
}
|
package/plugin/analytics.js
CHANGED
|
@@ -26,4 +26,12 @@ const createFiatBalancesAnalyticsPlugin = ({
|
|
|
26
26
|
return { onStart, onStop }
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const fiatBalancesAnalyticsPluginDefinition = {
|
|
30
|
+
id: 'fiatBalancesAnalyticsPlugin',
|
|
31
|
+
type: 'plugin',
|
|
32
|
+
factory: createFiatBalancesAnalyticsPlugin,
|
|
33
|
+
dependencies: ['analytics', 'fiatBalancesAtom', 'config?'],
|
|
34
|
+
public: true,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default fiatBalancesAnalyticsPluginDefinition
|
package/plugin/index.js
CHANGED
|
@@ -1,64 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const createFiatBalancesPlugin = ({
|
|
5
|
-
port,
|
|
6
|
-
fiatBalancesAtom,
|
|
7
|
-
optimisticFiatBalancesAtom,
|
|
8
|
-
fiatBalances,
|
|
9
|
-
optimisticFiatBalances,
|
|
10
|
-
}) => {
|
|
11
|
-
const fiatBalancesAtomObserver = createAtomObserver({
|
|
12
|
-
port,
|
|
13
|
-
atom: fiatBalancesAtom,
|
|
14
|
-
event: 'fiatBalances',
|
|
15
|
-
})
|
|
16
|
-
const optimisticFiatBalancesAtomObserver = optimisticFiatBalancesAtom
|
|
17
|
-
? createAtomObserver({
|
|
18
|
-
port,
|
|
19
|
-
atom: optimisticFiatBalancesAtom,
|
|
20
|
-
event: 'optimisticFiatBalances',
|
|
21
|
-
})
|
|
22
|
-
: null
|
|
23
|
-
fiatBalancesAtomObserver.register()
|
|
24
|
-
optimisticFiatBalancesAtomObserver?.register()
|
|
25
|
-
return {
|
|
26
|
-
onStart: () => {
|
|
27
|
-
fiatBalances.load()
|
|
28
|
-
optimisticFiatBalances?.load()
|
|
29
|
-
},
|
|
30
|
-
onLoad: () => {
|
|
31
|
-
fiatBalancesAtomObserver.start()
|
|
32
|
-
optimisticFiatBalancesAtomObserver?.start()
|
|
33
|
-
},
|
|
34
|
-
onStop: () => {
|
|
35
|
-
fiatBalancesAtomObserver.unregister()
|
|
36
|
-
optimisticFiatBalancesAtomObserver?.unregister()
|
|
37
|
-
fiatBalances.stop()
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const fiatBalancesPluginDefinition = {
|
|
43
|
-
id: 'fiatBalancesPlugin',
|
|
44
|
-
type: 'plugin',
|
|
45
|
-
factory: createFiatBalancesPlugin,
|
|
46
|
-
dependencies: [
|
|
47
|
-
'fiatBalances',
|
|
48
|
-
'port',
|
|
49
|
-
'fiatBalancesAtom',
|
|
50
|
-
'optimisticFiatBalances?',
|
|
51
|
-
'optimisticFiatBalancesAtom?',
|
|
52
|
-
],
|
|
53
|
-
public: true,
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const fiatBalancesAnalyticsPlugin = {
|
|
57
|
-
id: 'fiatBalancesAnalyticsPlugin',
|
|
58
|
-
type: 'plugin',
|
|
59
|
-
factory: createFiatBalancesAnalyticsPlugin,
|
|
60
|
-
dependencies: ['analytics', 'fiatBalancesAtom', 'config?'],
|
|
61
|
-
public: true,
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default fiatBalancesPluginDefinition
|
|
1
|
+
export { default as fiatBalancesPluginDefinition } from './lifecycle.js'
|
|
2
|
+
export { default as fiatBalancesAnalyticsPluginDefinition } from './analytics.js'
|
|
3
|
+
export { default as trackNonDustAssetsNamesPluginDefinition } from './track-non-dust-asset-names.js'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createAtomObserver } from '@exodus/atoms'
|
|
2
|
+
|
|
3
|
+
const createFiatBalancesPlugin = ({
|
|
4
|
+
port,
|
|
5
|
+
fiatBalancesAtom,
|
|
6
|
+
optimisticFiatBalancesAtom,
|
|
7
|
+
fiatBalances,
|
|
8
|
+
optimisticFiatBalances,
|
|
9
|
+
}) => {
|
|
10
|
+
const fiatBalancesAtomObserver = createAtomObserver({
|
|
11
|
+
port,
|
|
12
|
+
atom: fiatBalancesAtom,
|
|
13
|
+
event: 'fiatBalances',
|
|
14
|
+
})
|
|
15
|
+
const optimisticFiatBalancesAtomObserver = optimisticFiatBalancesAtom
|
|
16
|
+
? createAtomObserver({
|
|
17
|
+
port,
|
|
18
|
+
atom: optimisticFiatBalancesAtom,
|
|
19
|
+
event: 'optimisticFiatBalances',
|
|
20
|
+
})
|
|
21
|
+
: null
|
|
22
|
+
fiatBalancesAtomObserver.register()
|
|
23
|
+
optimisticFiatBalancesAtomObserver?.register()
|
|
24
|
+
return {
|
|
25
|
+
onStart: () => {
|
|
26
|
+
fiatBalances.load()
|
|
27
|
+
optimisticFiatBalances?.load()
|
|
28
|
+
},
|
|
29
|
+
onLoad: () => {
|
|
30
|
+
fiatBalancesAtomObserver.start()
|
|
31
|
+
optimisticFiatBalancesAtomObserver?.start()
|
|
32
|
+
},
|
|
33
|
+
onStop: () => {
|
|
34
|
+
fiatBalancesAtomObserver.unregister()
|
|
35
|
+
optimisticFiatBalancesAtomObserver?.unregister()
|
|
36
|
+
fiatBalances.stop()
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const fiatBalancesPluginDefinition = {
|
|
42
|
+
id: 'fiatBalancesPlugin',
|
|
43
|
+
type: 'plugin',
|
|
44
|
+
factory: createFiatBalancesPlugin,
|
|
45
|
+
dependencies: [
|
|
46
|
+
'fiatBalances',
|
|
47
|
+
'port',
|
|
48
|
+
'fiatBalancesAtom',
|
|
49
|
+
'optimisticFiatBalances?',
|
|
50
|
+
'optimisticFiatBalancesAtom?',
|
|
51
|
+
],
|
|
52
|
+
public: true,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default fiatBalancesPluginDefinition
|
|
@@ -3,25 +3,23 @@ import fiatCurrencies from '@exodus/fiat-currencies'
|
|
|
3
3
|
|
|
4
4
|
const { USD } = fiatCurrencies
|
|
5
5
|
|
|
6
|
-
const DEFAULT_BALANCES_THRESHOLD_USD = USD.defaultUnit(0.5)
|
|
7
|
-
|
|
8
6
|
const createTrackNonDustAssetNamesPlugin = ({
|
|
9
7
|
assetsModule,
|
|
10
8
|
fiatBalancesAtom,
|
|
11
9
|
fiatRateConverter,
|
|
12
10
|
nonDustBalanceAssetNamesAtom,
|
|
13
|
-
config: {
|
|
14
|
-
balanceThresholdsUsd = Object.create(null),
|
|
15
|
-
balanceThresholdByChainUsd = Object.create(null),
|
|
16
|
-
defaultBalanceThresholdUsd = DEFAULT_BALANCES_THRESHOLD_USD,
|
|
17
|
-
},
|
|
11
|
+
config: { balanceThresholdsUsd, balanceThresholdByChainUsd, defaultBalanceThresholdUsd },
|
|
18
12
|
}) => {
|
|
19
13
|
const handleFiatBalancesChanged = async ({ balances }) => {
|
|
20
14
|
const { byAssetSource } = balances
|
|
21
15
|
if (!byAssetSource) return
|
|
22
16
|
|
|
23
17
|
const balancesByAssetSource = flattenToPaths(byAssetSource).map(
|
|
24
|
-
([walletAccount, assetName,
|
|
18
|
+
([walletAccount, assetName, _balanceField, balance]) => ({
|
|
19
|
+
walletAccount,
|
|
20
|
+
assetName,
|
|
21
|
+
balance,
|
|
22
|
+
})
|
|
25
23
|
)
|
|
26
24
|
|
|
27
25
|
const aboveThreshold = await filterAsync(
|
package/redux/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const createFiatBalancesReduxDefinition = ({
|
|
|
42
42
|
return {
|
|
43
43
|
...state,
|
|
44
44
|
loaded: true,
|
|
45
|
-
optimisticLoaded: true,
|
|
45
|
+
optimisticLoaded: optimisticActivityEnabled ? state.optimisticLoaded : true,
|
|
46
46
|
data,
|
|
47
47
|
optimisticData: optimisticActivityEnabled ? state.optimisticData : data,
|
|
48
48
|
}
|
|
@@ -24,8 +24,9 @@ const sortAssetsSelectorFactoryCreator = ({
|
|
|
24
24
|
ignoreMarketCapAssets,
|
|
25
25
|
assetsListSelector,
|
|
26
26
|
}) =>
|
|
27
|
-
memoize((walletAccount) =>
|
|
28
|
-
|
|
27
|
+
memoize((walletAccount) => {
|
|
28
|
+
let lastResult
|
|
29
|
+
return createSelector(
|
|
29
30
|
assetsListSelector,
|
|
30
31
|
(state) => getAccountAssetsBalanceSelector(state)(walletAccount),
|
|
31
32
|
(state) => fiatBalancesByAssetSourceSelector(state)[walletAccount],
|
|
@@ -78,9 +79,22 @@ const sortAssetsSelectorFactoryCreator = ({
|
|
|
78
79
|
})
|
|
79
80
|
|
|
80
81
|
const sorted = orderBy(assetsWithMetaData, SORT_KEYS, SORT_ORDER)
|
|
81
|
-
|
|
82
|
+
const namesOnly = sorted.map((assetWithMetaData) => assetWithMetaData.name)
|
|
83
|
+
const lastSortedAssetNames = lastResult ? lastResult.map((a) => a.name) : null
|
|
84
|
+
// Compare newResult with lastResult for reference equality
|
|
85
|
+
if (
|
|
86
|
+
lastSortedAssetNames &&
|
|
87
|
+
namesOnly.length === lastSortedAssetNames.length &&
|
|
88
|
+
namesOnly.every((item, i) => item === lastSortedAssetNames[i])
|
|
89
|
+
) {
|
|
90
|
+
return lastResult
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
lastResult = sorted.map((assetWithMetaData) => assetsMap[assetWithMetaData.name])
|
|
94
|
+
|
|
95
|
+
return lastResult
|
|
82
96
|
}
|
|
83
97
|
)
|
|
84
|
-
)
|
|
98
|
+
})
|
|
85
99
|
|
|
86
100
|
export default sortAssetsSelectorFactoryCreator
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import fiatCurrencies from '@exodus/fiat-currencies'
|
|
2
|
+
|
|
3
|
+
const { USD } = fiatCurrencies
|
|
4
|
+
|
|
5
|
+
export const defaultNonDustAssetsConfig = {
|
|
6
|
+
balanceThresholdsUsd: Object.create(null),
|
|
7
|
+
defaultBalanceThresholdUsd: USD.defaultUnit(0.5),
|
|
8
|
+
balanceThresholdByChainUsd: Object.create(null),
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const defaultConfig = {
|
|
12
|
+
optimistic: false,
|
|
13
|
+
nonDustAssets: Object.create(null),
|
|
14
|
+
balanceFields: ['balance'],
|
|
15
|
+
assetsToTrackForBalances: [],
|
|
16
|
+
}
|
package/shared/index.js
ADDED