@exodus/balances 13.16.0 → 13.17.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 +10 -0
- package/README.md +1 -1
- package/atoms/asset-names-with-balance.d.ts +1 -0
- package/atoms/asset-names-with-balance.js +1 -40
- package/atoms/asset-total-wallet-amounts.d.ts +1 -0
- package/atoms/asset-total-wallet-amounts.js +1 -47
- package/atoms/assets-with-balance-count.d.ts +1 -0
- package/atoms/assets-with-balance-count.js +1 -8
- package/atoms/balances.d.ts +1 -0
- package/atoms/balances.js +1 -6
- package/atoms/funded-wallet-accounts.d.ts +1 -0
- package/atoms/funded-wallet-accounts.js +1 -25
- package/atoms/has-balance.d.ts +1 -0
- package/atoms/has-balance.js +1 -31
- package/atoms/index.d.ts +8 -0
- package/atoms/index.js +8 -54
- package/default-config.d.ts +1 -0
- package/default-config.js +1 -26
- package/index.d.ts +2 -35
- package/index.js +1 -65
- package/lib/atoms/asset-names-with-balance.d.ts +5 -0
- package/lib/atoms/asset-names-with-balance.js +31 -0
- package/lib/atoms/asset-total-wallet-amounts.d.ts +5 -0
- package/lib/atoms/asset-total-wallet-amounts.js +39 -0
- package/lib/atoms/assets-with-balance-count.d.ts +5 -0
- package/lib/atoms/assets-with-balance-count.js +6 -0
- package/lib/atoms/balances.d.ts +3 -0
- package/lib/atoms/balances.js +3 -0
- package/lib/atoms/funded-wallet-accounts.d.ts +8 -0
- package/lib/atoms/funded-wallet-accounts.js +19 -0
- package/lib/atoms/has-balance.d.ts +7 -0
- package/lib/atoms/has-balance.js +21 -0
- package/lib/atoms/index.d.ts +54 -0
- package/lib/atoms/index.js +48 -0
- package/lib/default-config.d.ts +3 -0
- package/lib/default-config.js +24 -0
- package/lib/index.d.ts +187 -0
- package/lib/index.js +49 -0
- package/lib/module/balances-utils.d.ts +13 -0
- package/lib/module/balances-utils.js +70 -0
- package/lib/module/index.d.ts +11 -0
- package/lib/module/index.js +367 -0
- package/lib/module/mockable-balances.d.ts +16 -0
- package/lib/module/mockable-balances.js +21 -0
- package/lib/module/types.d.ts +80 -0
- package/lib/module/types.js +1 -0
- package/lib/plugins/analytics.d.ts +18 -0
- package/lib/plugins/analytics.js +30 -0
- package/lib/plugins/index.d.ts +35 -0
- package/lib/plugins/index.js +22 -0
- package/lib/plugins/lifecycle.d.ts +14 -0
- package/lib/plugins/lifecycle.js +32 -0
- package/lib/redux/id.d.ts +2 -0
- package/lib/redux/id.js +1 -0
- package/lib/redux/index.d.ts +588 -0
- package/lib/redux/index.js +53 -0
- package/lib/redux/initial-state.d.ts +3 -0
- package/lib/redux/initial-state.js +6 -0
- package/lib/redux/multi-account-helper.d.ts +463 -0
- package/lib/redux/multi-account-helper.js +23 -0
- package/lib/redux/selectors/by-asset.d.ts +12 -0
- package/lib/redux/selectors/by-asset.js +19 -0
- package/lib/redux/selectors/create-balance-selectors.d.ts +70 -0
- package/lib/redux/selectors/create-balance-selectors.js +32 -0
- package/lib/redux/selectors/create-balances.d.ts +11 -0
- package/lib/redux/selectors/create-balances.js +13 -0
- package/lib/redux/selectors/create-fuel-threshold.d.ts +19 -0
- package/lib/redux/selectors/create-fuel-threshold.js +22 -0
- package/lib/redux/selectors/create-requires-fuel-threshold.d.ts +19 -0
- package/lib/redux/selectors/create-requires-fuel-threshold.js +29 -0
- package/lib/redux/selectors/create-unconfirmed-balance.d.ts +15 -0
- package/lib/redux/selectors/create-unconfirmed-balance.js +14 -0
- package/lib/redux/selectors/get-balance-for-field.d.ts +14 -0
- package/lib/redux/selectors/get-balance-for-field.js +19 -0
- package/lib/redux/selectors/get-balance-selectors.d.ts +68 -0
- package/lib/redux/selectors/get-balance-selectors.js +32 -0
- package/lib/redux/selectors/get-balances.d.ts +10 -0
- package/lib/redux/selectors/get-balances.js +13 -0
- package/lib/redux/selectors/get-unconfirmed-balance.d.ts +19 -0
- package/lib/redux/selectors/get-unconfirmed-balance.js +27 -0
- package/lib/redux/selectors/index.d.ts +339 -0
- package/lib/redux/selectors/index.js +22 -0
- package/lib/redux/types.d.ts +45 -0
- package/lib/redux/types.js +1 -0
- package/lib/report/index.d.ts +34 -0
- package/lib/report/index.js +51 -0
- package/lib/types.d.ts +24 -0
- package/lib/types.js +1 -0
- package/module/balances-utils.d.ts +1 -0
- package/module/balances-utils.js +1 -86
- package/module/index.d.ts +2 -0
- package/module/index.js +2 -490
- package/module/mockable-balances.d.ts +1 -0
- package/module/mockable-balances.js +1 -27
- package/package.json +36 -29
- package/plugins/analytics.d.ts +1 -0
- package/plugins/analytics.js +1 -48
- package/plugins/index.d.ts +4 -0
- package/plugins/index.js +4 -24
- package/plugins/lifecycle.d.ts +1 -0
- package/plugins/lifecycle.js +1 -40
- package/redux/id.d.ts +1 -0
- package/redux/id.js +1 -1
- package/redux/index.d.ts +2 -0
- package/redux/index.js +1 -61
- package/redux/initial-state.d.ts +1 -0
- package/redux/initial-state.js +1 -8
- package/redux/multi-account-helper.d.ts +1 -0
- package/redux/multi-account-helper.js +1 -14
- package/redux/selectors/by-asset.d.ts +1 -0
- package/redux/selectors/by-asset.js +1 -25
- package/redux/selectors/create-balance-selectors.d.ts +1 -0
- package/redux/selectors/create-balance-selectors.js +1 -48
- package/redux/selectors/create-balances.d.ts +1 -0
- package/redux/selectors/create-balances.js +1 -26
- package/redux/selectors/create-fuel-threshold.d.ts +1 -0
- package/redux/selectors/create-fuel-threshold.js +1 -32
- package/redux/selectors/create-requires-fuel-threshold.d.ts +1 -0
- package/redux/selectors/create-requires-fuel-threshold.js +1 -59
- package/redux/selectors/create-unconfirmed-balance.d.ts +1 -0
- package/redux/selectors/create-unconfirmed-balance.js +1 -28
- package/redux/selectors/get-balance-for-field.d.ts +1 -0
- package/redux/selectors/get-balance-for-field.js +1 -34
- package/redux/selectors/get-balance-selectors.d.ts +1 -0
- package/redux/selectors/get-balance-selectors.js +1 -42
- package/redux/selectors/get-balances.d.ts +1 -0
- package/redux/selectors/get-balances.js +1 -24
- package/redux/selectors/get-unconfirmed-balance.d.ts +2 -0
- package/redux/selectors/get-unconfirmed-balance.js +2 -43
- package/redux/selectors/index.d.ts +1 -0
- package/redux/selectors/index.js +1 -23
- package/report/index.d.ts +1 -0
- package/report/index.js +1 -61
- package/tsconfig.json +0 -4
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import type { State, AccountBalancesState } from './types.js';
|
|
2
|
+
import type { BalancesAtomValue } from '../types.js';
|
|
3
|
+
import lodash from 'lodash';
|
|
4
|
+
declare const balancesReduxDefinition: {
|
|
5
|
+
readonly id: "balances";
|
|
6
|
+
readonly type: "redux-module";
|
|
7
|
+
readonly initialState: import("./types.js").InitialState;
|
|
8
|
+
readonly eventReducers: {
|
|
9
|
+
readonly balances: (state: State, payload: BalancesAtomValue) => {
|
|
10
|
+
[x: string]: boolean | AccountBalancesState | {
|
|
11
|
+
loaded: boolean;
|
|
12
|
+
error: null;
|
|
13
|
+
data: Record<string, Record<import("@exodus/asset-types").BalanceFieldName, import("@exodus/currency").default>>;
|
|
14
|
+
} | {
|
|
15
|
+
data: import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> & Record<string, Record<import("@exodus/asset-types").BalanceFieldName, import("@exodus/currency").default>>;
|
|
16
|
+
error: unknown;
|
|
17
|
+
loaded: boolean;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
};
|
|
20
|
+
hasBalance: boolean;
|
|
21
|
+
};
|
|
22
|
+
readonly hasBalance: (state: State, payload: boolean) => {
|
|
23
|
+
hasBalance: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly selectorDefinitions: readonly [{
|
|
27
|
+
readonly id: "createAssetSourceSelector";
|
|
28
|
+
readonly selectorFactory: <TState>(myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>, getAssetInstanceSelector: (state: TState) => (assetName: string) => import("../module/types.js").BalanceAsset) => (source: {
|
|
29
|
+
walletAccount: string;
|
|
30
|
+
assetName: string;
|
|
31
|
+
network?: string;
|
|
32
|
+
}) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined;
|
|
33
|
+
readonly dependencies: readonly [{
|
|
34
|
+
readonly selector: "$state";
|
|
35
|
+
}, {
|
|
36
|
+
readonly module: "assets";
|
|
37
|
+
readonly selector: "getAsset";
|
|
38
|
+
}];
|
|
39
|
+
}, {
|
|
40
|
+
readonly id: "createAssetSourceSelectorOld";
|
|
41
|
+
readonly resultFunction: (myState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>, activeWalletAccount: string, getAssetInstance: (assetName: string) => import("../module/types.js").BalanceAsset) => import("@exodus/basic-utils/lib/memoize.js").MemoizedFunction<({ walletAccount, assetName }: Omit<{
|
|
42
|
+
walletAccount: string;
|
|
43
|
+
assetName: string;
|
|
44
|
+
network?: string;
|
|
45
|
+
}, "walletAccount"> & {
|
|
46
|
+
walletAccount?: string;
|
|
47
|
+
}) => import("../module/types.js").FieldBalances | null | undefined>;
|
|
48
|
+
readonly dependencies: readonly [{
|
|
49
|
+
readonly selector: "$state";
|
|
50
|
+
}, {
|
|
51
|
+
readonly module: "walletAccounts";
|
|
52
|
+
readonly selector: "active";
|
|
53
|
+
}, {
|
|
54
|
+
readonly module: "assets";
|
|
55
|
+
readonly selector: "getAsset";
|
|
56
|
+
}];
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "createBaseAssetSourceSelector";
|
|
59
|
+
readonly selectorFactory: <TState>(myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>, getAssetInstanceSelector: (state: TState) => (assetName: string) => import("../module/types.js").BalanceAsset) => (source: {
|
|
60
|
+
walletAccount: string;
|
|
61
|
+
assetName: string;
|
|
62
|
+
network?: string;
|
|
63
|
+
}) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined;
|
|
64
|
+
readonly dependencies: readonly [{
|
|
65
|
+
readonly selector: "$state";
|
|
66
|
+
}, {
|
|
67
|
+
readonly module: "assets";
|
|
68
|
+
readonly selector: "getAsset";
|
|
69
|
+
}];
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "createBaseAssetSourceSelectorOld";
|
|
72
|
+
readonly resultFunction: (myState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>, activeWalletAccount: string, getAssetInstance: (assetName: string) => import("../module/types.js").BalanceAsset) => import("@exodus/basic-utils/lib/memoize.js").MemoizedFunction<({ walletAccount, assetName }: {
|
|
73
|
+
walletAccount: string;
|
|
74
|
+
assetName: string;
|
|
75
|
+
network?: string;
|
|
76
|
+
}) => import("../module/types.js").FieldBalances | null | undefined>;
|
|
77
|
+
readonly dependencies: readonly [{
|
|
78
|
+
readonly selector: "$state";
|
|
79
|
+
}, {
|
|
80
|
+
readonly module: "walletAccounts";
|
|
81
|
+
readonly selector: "active";
|
|
82
|
+
}, {
|
|
83
|
+
readonly module: "assets";
|
|
84
|
+
readonly selector: "getAsset";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly id: "createActiveAssetSourceSelectorOld";
|
|
88
|
+
readonly resultFunction: (activeWalletAccount: string, getAssetInstance: (assetName: string) => import("../module/types.js").BalanceAsset, myState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => import("@exodus/basic-utils/lib/memoize.js").MemoizedFunction<(assetName: string) => import("../module/types.js").FieldBalances | null | undefined>;
|
|
89
|
+
readonly dependencies: readonly [{
|
|
90
|
+
readonly module: "walletAccounts";
|
|
91
|
+
readonly selector: "active";
|
|
92
|
+
}, {
|
|
93
|
+
readonly module: "assets";
|
|
94
|
+
readonly selector: "getAsset";
|
|
95
|
+
}, {
|
|
96
|
+
readonly selector: "$state";
|
|
97
|
+
}];
|
|
98
|
+
}, {
|
|
99
|
+
readonly id: "createActiveAssetSourceSelector";
|
|
100
|
+
readonly selectorFactory: <TState>(activeWalletAccountSelector: (state: TState) => string, getAssetInstanceSelector: (state: TState) => (assetName: string) => import("../module/types.js").BalanceAsset, myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (assetName: string) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined;
|
|
101
|
+
readonly dependencies: readonly [{
|
|
102
|
+
readonly module: "walletAccounts";
|
|
103
|
+
readonly selector: "active";
|
|
104
|
+
}, {
|
|
105
|
+
readonly module: "assets";
|
|
106
|
+
readonly selector: "getAsset";
|
|
107
|
+
}, {
|
|
108
|
+
readonly selector: "$state";
|
|
109
|
+
}];
|
|
110
|
+
}, {
|
|
111
|
+
readonly id: "createActiveBaseAssetSourceSelector";
|
|
112
|
+
readonly selectorFactory: <TState>(activeWalletAccountSelector: (state: TState) => string, getAssetInstanceSelector: (state: TState) => (assetName: string) => import("../module/types.js").BalanceAsset, myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (assetName: string) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined;
|
|
113
|
+
readonly dependencies: readonly [{
|
|
114
|
+
readonly module: "walletAccounts";
|
|
115
|
+
readonly selector: "active";
|
|
116
|
+
}, {
|
|
117
|
+
readonly module: "assets";
|
|
118
|
+
readonly selector: "getAsset";
|
|
119
|
+
}, {
|
|
120
|
+
readonly selector: "$state";
|
|
121
|
+
}];
|
|
122
|
+
}, {
|
|
123
|
+
readonly id: "createIsWalletAccountLoadingSelectorOld";
|
|
124
|
+
readonly selectorFactory: <TState>(activeWalletAccountSelector: (state: TState) => string, myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (state: TState) => (walletAccount?: string) => boolean;
|
|
125
|
+
readonly dependencies: readonly [{
|
|
126
|
+
readonly module: "walletAccounts";
|
|
127
|
+
readonly selector: "active";
|
|
128
|
+
}, {
|
|
129
|
+
readonly selector: "$state";
|
|
130
|
+
}];
|
|
131
|
+
}, {
|
|
132
|
+
readonly id: "createIsWalletAccountLoadingSelector";
|
|
133
|
+
readonly selectorFactory: <TState>(myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (walletAccount: string) => (state: TState) => boolean;
|
|
134
|
+
readonly dependencies: readonly [{
|
|
135
|
+
readonly selector: "$state";
|
|
136
|
+
}];
|
|
137
|
+
}, {
|
|
138
|
+
readonly id: "createIsWalletAccountLoadedSelectorOld";
|
|
139
|
+
readonly resultFunction: (activeWalletAccount: string, subState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (walletAccount?: string) => boolean;
|
|
140
|
+
readonly dependencies: readonly [{
|
|
141
|
+
readonly module: "walletAccounts";
|
|
142
|
+
readonly selector: "active";
|
|
143
|
+
}, {
|
|
144
|
+
readonly selector: "$state";
|
|
145
|
+
}];
|
|
146
|
+
}, {
|
|
147
|
+
readonly id: "createIsWalletAccountLoadedSelector";
|
|
148
|
+
readonly selectorFactory: <TState>(myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (walletAccount: string) => (state: TState) => boolean;
|
|
149
|
+
readonly dependencies: readonly [{
|
|
150
|
+
readonly selector: "$state";
|
|
151
|
+
}];
|
|
152
|
+
}, {
|
|
153
|
+
readonly id: "isActiveWalletAccountLoading";
|
|
154
|
+
readonly resultFunction: (activeWalletAccount: string, subState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => boolean;
|
|
155
|
+
readonly dependencies: readonly [{
|
|
156
|
+
readonly module: "walletAccounts";
|
|
157
|
+
readonly selector: "active";
|
|
158
|
+
}, {
|
|
159
|
+
readonly selector: "$state";
|
|
160
|
+
}];
|
|
161
|
+
}, {
|
|
162
|
+
readonly id: "isActiveWalletAccountLoaded";
|
|
163
|
+
readonly resultFunction: (activeWalletAccount: string, subState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => boolean;
|
|
164
|
+
readonly dependencies: readonly [{
|
|
165
|
+
readonly module: "walletAccounts";
|
|
166
|
+
readonly selector: "active";
|
|
167
|
+
}, {
|
|
168
|
+
readonly selector: "$state";
|
|
169
|
+
}];
|
|
170
|
+
}, {
|
|
171
|
+
readonly id: "createAccountAssetsSelector";
|
|
172
|
+
readonly selectorFactory: <TState>(myStateSelector: (state: TState) => import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (walletAccount: string) => (state: TState) => import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined;
|
|
173
|
+
readonly dependencies: readonly [{
|
|
174
|
+
readonly selector: "$state";
|
|
175
|
+
}];
|
|
176
|
+
}, {
|
|
177
|
+
readonly id: "activeAccountAssetsSelector";
|
|
178
|
+
readonly resultFunction: (myState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>, activeAccount: string) => import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined;
|
|
179
|
+
readonly dependencies: readonly [{
|
|
180
|
+
readonly selector: "$state";
|
|
181
|
+
}, {
|
|
182
|
+
readonly module: "walletAccounts";
|
|
183
|
+
readonly selector: "active";
|
|
184
|
+
}];
|
|
185
|
+
}, {
|
|
186
|
+
readonly id: "getAccountAssetsSelector";
|
|
187
|
+
readonly resultFunction: (myState: import("@exodus/multi-account-redux").SliceState<import("../module/types.js").FieldBalances>) => (walletAccount: string) => import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined;
|
|
188
|
+
readonly dependencies: readonly [{
|
|
189
|
+
readonly selector: "$state";
|
|
190
|
+
}];
|
|
191
|
+
}, ...({
|
|
192
|
+
readonly id: "byAsset";
|
|
193
|
+
readonly resultFunction: (walletAccounts: string[], getAssetBalances: (account: string) => Record<string, import("@exodus/currency").default>) => Record<string, import("@exodus/currency").default>;
|
|
194
|
+
readonly dependencies: readonly [{
|
|
195
|
+
readonly module: "walletAccounts";
|
|
196
|
+
readonly selector: "enabled";
|
|
197
|
+
}, {
|
|
198
|
+
readonly selector: "getAccountAssetsBalanceSelector";
|
|
199
|
+
}];
|
|
200
|
+
} | {
|
|
201
|
+
readonly id: "createUnconfirmedBalance";
|
|
202
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, createAssetSourceSelector: (source: import("./types.js").Source) => import("./types.js").Selector<import("@exodus/models").TxSet>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default, (res1: import("./types.js").Asset | undefined, res2: import("@exodus/models").TxSet) => import("@exodus/currency").default>) & lodash.MemoizedFunction;
|
|
203
|
+
readonly dependencies: readonly [{
|
|
204
|
+
readonly module: "assets";
|
|
205
|
+
readonly selector: "createAssetSelector";
|
|
206
|
+
}, {
|
|
207
|
+
readonly module: "txLog";
|
|
208
|
+
readonly selector: "createAssetSourceSelector";
|
|
209
|
+
}];
|
|
210
|
+
} | {
|
|
211
|
+
readonly id: "getBalanceForField";
|
|
212
|
+
readonly resultFunction: (getAsset: import("./types.js").GetAsset, getBalances: import("./types.js").GetBalances) => (({ assetName, walletAccount, field }: import("./types.js").FieldSource) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
213
|
+
readonly dependencies: readonly [{
|
|
214
|
+
readonly module: "assets";
|
|
215
|
+
readonly selector: "getAsset";
|
|
216
|
+
}, {
|
|
217
|
+
readonly module: "balances";
|
|
218
|
+
readonly selector: "getBalances";
|
|
219
|
+
}];
|
|
220
|
+
} | ({
|
|
221
|
+
readonly id: "getTotal";
|
|
222
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
223
|
+
readonly dependencies: readonly [{
|
|
224
|
+
readonly module: "balances";
|
|
225
|
+
readonly selector: "getBalanceForField";
|
|
226
|
+
}];
|
|
227
|
+
} | {
|
|
228
|
+
readonly id: "getBalance";
|
|
229
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
230
|
+
readonly dependencies: readonly [{
|
|
231
|
+
readonly module: "balances";
|
|
232
|
+
readonly selector: "getBalanceForField";
|
|
233
|
+
}];
|
|
234
|
+
} | {
|
|
235
|
+
readonly id: "getSpendable";
|
|
236
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
237
|
+
readonly dependencies: readonly [{
|
|
238
|
+
readonly module: "balances";
|
|
239
|
+
readonly selector: "getBalanceForField";
|
|
240
|
+
}];
|
|
241
|
+
} | {
|
|
242
|
+
readonly id: "getSpendableBalance";
|
|
243
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
244
|
+
readonly dependencies: readonly [{
|
|
245
|
+
readonly module: "balances";
|
|
246
|
+
readonly selector: "getBalanceForField";
|
|
247
|
+
}];
|
|
248
|
+
} | {
|
|
249
|
+
readonly id: "getUnconfirmedSent";
|
|
250
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
251
|
+
readonly dependencies: readonly [{
|
|
252
|
+
readonly module: "balances";
|
|
253
|
+
readonly selector: "getBalanceForField";
|
|
254
|
+
}];
|
|
255
|
+
} | {
|
|
256
|
+
readonly id: "getUnconfirmedReceived";
|
|
257
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
258
|
+
readonly dependencies: readonly [{
|
|
259
|
+
readonly module: "balances";
|
|
260
|
+
readonly selector: "getBalanceForField";
|
|
261
|
+
}];
|
|
262
|
+
} | {
|
|
263
|
+
readonly id: "getUnspendable";
|
|
264
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
265
|
+
readonly dependencies: readonly [{
|
|
266
|
+
readonly module: "balances";
|
|
267
|
+
readonly selector: "getBalanceForField";
|
|
268
|
+
}];
|
|
269
|
+
} | {
|
|
270
|
+
readonly id: "getWalletReserve";
|
|
271
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
272
|
+
readonly dependencies: readonly [{
|
|
273
|
+
readonly module: "balances";
|
|
274
|
+
readonly selector: "getBalanceForField";
|
|
275
|
+
}];
|
|
276
|
+
} | {
|
|
277
|
+
readonly id: "getNetworkReserve";
|
|
278
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
279
|
+
readonly dependencies: readonly [{
|
|
280
|
+
readonly module: "balances";
|
|
281
|
+
readonly selector: "getBalanceForField";
|
|
282
|
+
}];
|
|
283
|
+
} | {
|
|
284
|
+
readonly id: "getStaking";
|
|
285
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
286
|
+
readonly dependencies: readonly [{
|
|
287
|
+
readonly module: "balances";
|
|
288
|
+
readonly selector: "getBalanceForField";
|
|
289
|
+
}];
|
|
290
|
+
} | {
|
|
291
|
+
readonly id: "getStaked";
|
|
292
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
293
|
+
readonly dependencies: readonly [{
|
|
294
|
+
readonly module: "balances";
|
|
295
|
+
readonly selector: "getBalanceForField";
|
|
296
|
+
}];
|
|
297
|
+
} | {
|
|
298
|
+
readonly id: "getStakeable";
|
|
299
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
300
|
+
readonly dependencies: readonly [{
|
|
301
|
+
readonly module: "balances";
|
|
302
|
+
readonly selector: "getBalanceForField";
|
|
303
|
+
}];
|
|
304
|
+
} | {
|
|
305
|
+
readonly id: "getUnstaking";
|
|
306
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
307
|
+
readonly dependencies: readonly [{
|
|
308
|
+
readonly module: "balances";
|
|
309
|
+
readonly selector: "getBalanceForField";
|
|
310
|
+
}];
|
|
311
|
+
} | {
|
|
312
|
+
readonly id: "getUnstaked";
|
|
313
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
314
|
+
readonly dependencies: readonly [{
|
|
315
|
+
readonly module: "balances";
|
|
316
|
+
readonly selector: "getBalanceForField";
|
|
317
|
+
}];
|
|
318
|
+
} | {
|
|
319
|
+
readonly id: "getRewards";
|
|
320
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
321
|
+
readonly dependencies: readonly [{
|
|
322
|
+
readonly module: "balances";
|
|
323
|
+
readonly selector: "getBalanceForField";
|
|
324
|
+
}];
|
|
325
|
+
} | {
|
|
326
|
+
readonly id: "getFrozen";
|
|
327
|
+
readonly resultFunction: (getBalanceForField: import("./types.js").GetBalanceForField) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default | undefined) & lodash.MemoizedFunction;
|
|
328
|
+
readonly dependencies: readonly [{
|
|
329
|
+
readonly module: "balances";
|
|
330
|
+
readonly selector: "getBalanceForField";
|
|
331
|
+
}];
|
|
332
|
+
}) | ({
|
|
333
|
+
readonly id: "createTotal";
|
|
334
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
335
|
+
readonly dependencies: readonly [{
|
|
336
|
+
readonly module: "assets";
|
|
337
|
+
readonly selector: "createAssetSelector";
|
|
338
|
+
}, {
|
|
339
|
+
readonly selector: "$state";
|
|
340
|
+
}];
|
|
341
|
+
} | {
|
|
342
|
+
readonly id: "createBalance";
|
|
343
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
344
|
+
readonly dependencies: readonly [{
|
|
345
|
+
readonly module: "assets";
|
|
346
|
+
readonly selector: "createAssetSelector";
|
|
347
|
+
}, {
|
|
348
|
+
readonly selector: "$state";
|
|
349
|
+
}];
|
|
350
|
+
} | {
|
|
351
|
+
readonly id: "createSpendable";
|
|
352
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
353
|
+
readonly dependencies: readonly [{
|
|
354
|
+
readonly module: "assets";
|
|
355
|
+
readonly selector: "createAssetSelector";
|
|
356
|
+
}, {
|
|
357
|
+
readonly selector: "$state";
|
|
358
|
+
}];
|
|
359
|
+
} | {
|
|
360
|
+
readonly id: "createSpendableBalance";
|
|
361
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
362
|
+
readonly dependencies: readonly [{
|
|
363
|
+
readonly module: "assets";
|
|
364
|
+
readonly selector: "createAssetSelector";
|
|
365
|
+
}, {
|
|
366
|
+
readonly selector: "$state";
|
|
367
|
+
}];
|
|
368
|
+
} | {
|
|
369
|
+
readonly id: "createUnconfirmedSent";
|
|
370
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
371
|
+
readonly dependencies: readonly [{
|
|
372
|
+
readonly module: "assets";
|
|
373
|
+
readonly selector: "createAssetSelector";
|
|
374
|
+
}, {
|
|
375
|
+
readonly selector: "$state";
|
|
376
|
+
}];
|
|
377
|
+
} | {
|
|
378
|
+
readonly id: "createUnconfirmedReceived";
|
|
379
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
380
|
+
readonly dependencies: readonly [{
|
|
381
|
+
readonly module: "assets";
|
|
382
|
+
readonly selector: "createAssetSelector";
|
|
383
|
+
}, {
|
|
384
|
+
readonly selector: "$state";
|
|
385
|
+
}];
|
|
386
|
+
} | {
|
|
387
|
+
readonly id: "createUnspendable";
|
|
388
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
389
|
+
readonly dependencies: readonly [{
|
|
390
|
+
readonly module: "assets";
|
|
391
|
+
readonly selector: "createAssetSelector";
|
|
392
|
+
}, {
|
|
393
|
+
readonly selector: "$state";
|
|
394
|
+
}];
|
|
395
|
+
} | {
|
|
396
|
+
readonly id: "createWalletReserve";
|
|
397
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
398
|
+
readonly dependencies: readonly [{
|
|
399
|
+
readonly module: "assets";
|
|
400
|
+
readonly selector: "createAssetSelector";
|
|
401
|
+
}, {
|
|
402
|
+
readonly selector: "$state";
|
|
403
|
+
}];
|
|
404
|
+
} | {
|
|
405
|
+
readonly id: "createNetworkReserve";
|
|
406
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
407
|
+
readonly dependencies: readonly [{
|
|
408
|
+
readonly module: "assets";
|
|
409
|
+
readonly selector: "createAssetSelector";
|
|
410
|
+
}, {
|
|
411
|
+
readonly selector: "$state";
|
|
412
|
+
}];
|
|
413
|
+
} | {
|
|
414
|
+
readonly id: "createStaking";
|
|
415
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
416
|
+
readonly dependencies: readonly [{
|
|
417
|
+
readonly module: "assets";
|
|
418
|
+
readonly selector: "createAssetSelector";
|
|
419
|
+
}, {
|
|
420
|
+
readonly selector: "$state";
|
|
421
|
+
}];
|
|
422
|
+
} | {
|
|
423
|
+
readonly id: "createStaked";
|
|
424
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
425
|
+
readonly dependencies: readonly [{
|
|
426
|
+
readonly module: "assets";
|
|
427
|
+
readonly selector: "createAssetSelector";
|
|
428
|
+
}, {
|
|
429
|
+
readonly selector: "$state";
|
|
430
|
+
}];
|
|
431
|
+
} | {
|
|
432
|
+
readonly id: "createStakeable";
|
|
433
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
434
|
+
readonly dependencies: readonly [{
|
|
435
|
+
readonly module: "assets";
|
|
436
|
+
readonly selector: "createAssetSelector";
|
|
437
|
+
}, {
|
|
438
|
+
readonly selector: "$state";
|
|
439
|
+
}];
|
|
440
|
+
} | {
|
|
441
|
+
readonly id: "createUnstaking";
|
|
442
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
443
|
+
readonly dependencies: readonly [{
|
|
444
|
+
readonly module: "assets";
|
|
445
|
+
readonly selector: "createAssetSelector";
|
|
446
|
+
}, {
|
|
447
|
+
readonly selector: "$state";
|
|
448
|
+
}];
|
|
449
|
+
} | {
|
|
450
|
+
readonly id: "createUnstaked";
|
|
451
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
452
|
+
readonly dependencies: readonly [{
|
|
453
|
+
readonly module: "assets";
|
|
454
|
+
readonly selector: "createAssetSelector";
|
|
455
|
+
}, {
|
|
456
|
+
readonly selector: "$state";
|
|
457
|
+
}];
|
|
458
|
+
} | {
|
|
459
|
+
readonly id: "createRewards";
|
|
460
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
461
|
+
readonly dependencies: readonly [{
|
|
462
|
+
readonly module: "assets";
|
|
463
|
+
readonly selector: "createAssetSelector";
|
|
464
|
+
}, {
|
|
465
|
+
readonly selector: "$state";
|
|
466
|
+
}];
|
|
467
|
+
} | {
|
|
468
|
+
readonly id: "createFrozen";
|
|
469
|
+
readonly selectorFactory: (createAssetSelector: import("./types.js").CreateAssetSelector, selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | undefined, (res1: import("./types.js").Asset | undefined, res2: State) => import("@exodus/currency").default | undefined>) & lodash.MemoizedFunction;
|
|
470
|
+
readonly dependencies: readonly [{
|
|
471
|
+
readonly module: "assets";
|
|
472
|
+
readonly selector: "createAssetSelector";
|
|
473
|
+
}, {
|
|
474
|
+
readonly selector: "$state";
|
|
475
|
+
}];
|
|
476
|
+
}) | {
|
|
477
|
+
readonly id: "createAccountAssetsBalanceSelector";
|
|
478
|
+
readonly selectorFactory: <TState>(createAccountAssetsSelector: (walletAccount: string) => (state: TState) => import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined) => (walletAccount: string) => (state: TState) => Record<string, import("@exodus/currency").default | undefined>;
|
|
479
|
+
readonly dependencies: readonly [{
|
|
480
|
+
readonly selector: "createAccountAssetsSelector";
|
|
481
|
+
}];
|
|
482
|
+
} | {
|
|
483
|
+
readonly id: "activeAccountAssetsBalanceSelector";
|
|
484
|
+
readonly resultFunction: (accountAssets: import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined) => Record<string, import("@exodus/currency").default | undefined>;
|
|
485
|
+
readonly dependencies: readonly [{
|
|
486
|
+
readonly selector: "activeAccountAssetsSelector";
|
|
487
|
+
}];
|
|
488
|
+
} | {
|
|
489
|
+
readonly id: "getAccountAssetsBalanceSelector";
|
|
490
|
+
readonly resultFunction: (getAccountAssets: (walletAccount: string) => import("@exodus/multi-account-redux").PerAssetData<import("../module/types.js").FieldBalances> | undefined) => import("@exodus/basic-utils/lib/memoize.js").MemoizedFunction<(walletAccount: string) => Record<string, import("@exodus/currency").default | undefined>>;
|
|
491
|
+
readonly dependencies: readonly [{
|
|
492
|
+
readonly selector: "getAccountAssetsSelector";
|
|
493
|
+
}];
|
|
494
|
+
} | {
|
|
495
|
+
readonly id: "createAssetSourceBalanceSelector";
|
|
496
|
+
readonly selectorFactory: <TState>(createAssetSourceSelector: (key: {
|
|
497
|
+
walletAccount: string;
|
|
498
|
+
assetName: string;
|
|
499
|
+
network?: string;
|
|
500
|
+
}) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined) => (source: {
|
|
501
|
+
walletAccount: string;
|
|
502
|
+
assetName: string;
|
|
503
|
+
network?: string;
|
|
504
|
+
}) => (state: TState) => import("@exodus/currency").default | undefined;
|
|
505
|
+
readonly dependencies: readonly [{
|
|
506
|
+
readonly selector: "createAssetSourceSelector";
|
|
507
|
+
}];
|
|
508
|
+
} | {
|
|
509
|
+
readonly id: "createActiveAssetSourceBalanceSelector";
|
|
510
|
+
readonly selectorFactory: <TState>(createActiveAssetSourceSelector: (assetName: string) => (state: TState) => import("../module/types.js").FieldBalances | null | undefined) => (assetName: string) => (state: TState) => import("@exodus/currency").default | undefined;
|
|
511
|
+
readonly dependencies: readonly [{
|
|
512
|
+
readonly selector: "createActiveAssetSourceSelector";
|
|
513
|
+
}];
|
|
514
|
+
} | {
|
|
515
|
+
readonly id: "getAssetSourceBalanceSelector";
|
|
516
|
+
readonly resultFunction: (getAssetSource: (key: {
|
|
517
|
+
walletAccount: string;
|
|
518
|
+
assetName: string;
|
|
519
|
+
network?: string;
|
|
520
|
+
}) => import("../module/types.js").FieldBalances | null | undefined, activeWalletAccount: string) => import("@exodus/basic-utils/lib/memoize.js").MemoizedFunction<({ assetName, walletAccount }: Omit<{
|
|
521
|
+
walletAccount: string;
|
|
522
|
+
assetName: string;
|
|
523
|
+
network?: string;
|
|
524
|
+
}, "walletAccount"> & {
|
|
525
|
+
walletAccount?: string;
|
|
526
|
+
}) => import("@exodus/currency").default | undefined>;
|
|
527
|
+
readonly dependencies: readonly [{
|
|
528
|
+
readonly selector: "createAssetSourceSelectorOld";
|
|
529
|
+
}, {
|
|
530
|
+
readonly module: "walletAccounts";
|
|
531
|
+
readonly selector: "active";
|
|
532
|
+
}];
|
|
533
|
+
})[], {
|
|
534
|
+
readonly id: "createBalances";
|
|
535
|
+
readonly selectorFactory: (selfSelector: import("./types.js").Selector<State>) => (({ assetName, walletAccount }: import("./types.js").Source) => import("reselect").OutputSelector<unknown, import("../module/types.js").FieldBalances, (res: State) => import("../module/types.js").FieldBalances>) & lodash.MemoizedFunction;
|
|
536
|
+
readonly dependencies: readonly [{
|
|
537
|
+
readonly selector: "$state";
|
|
538
|
+
}];
|
|
539
|
+
}, {
|
|
540
|
+
readonly id: "getBalances";
|
|
541
|
+
readonly selectorFactory: (selfSelector: import("./types.js").Selector<State>) => import("reselect").OutputSelector<unknown, (({ assetName, walletAccount }: import("./types.js").Source) => import("../module/types.js").FieldBalances | undefined) & lodash.MemoizedFunction, (res: State) => (({ assetName, walletAccount }: import("./types.js").Source) => import("../module/types.js").FieldBalances | undefined) & lodash.MemoizedFunction>;
|
|
542
|
+
readonly dependencies: readonly [{
|
|
543
|
+
readonly selector: "$state";
|
|
544
|
+
}];
|
|
545
|
+
}, {
|
|
546
|
+
readonly id: "getUnconfirmedBalance";
|
|
547
|
+
readonly selectorFactory: (getAssetSelector: import("./types.js").Selector<import("./types.js").GetAsset>, createAssetSourceSelector: import("./types.js").Selector<import("./types.js").GetTxs>) => import("reselect").OutputSelector<unknown, (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default) & lodash.MemoizedFunction, (res1: import("./types.js").GetAsset, res2: import("./types.js").GetTxs) => (({ assetName, walletAccount }: import("./types.js").Source) => import("@exodus/currency").default) & lodash.MemoizedFunction>;
|
|
548
|
+
readonly dependencies: readonly [{
|
|
549
|
+
readonly module: "assets";
|
|
550
|
+
readonly selector: "getAsset";
|
|
551
|
+
}, {
|
|
552
|
+
readonly module: "txLog";
|
|
553
|
+
readonly selector: "createAssetSourceSelectorOld";
|
|
554
|
+
}];
|
|
555
|
+
}, {
|
|
556
|
+
readonly id: "createFuelThreshold";
|
|
557
|
+
readonly selectorFactory: (getFeeDataSelector: import("./types.js").Selector<(name: string) => {
|
|
558
|
+
fuelThreshold?: import("@exodus/currency").default;
|
|
559
|
+
} | undefined>, createAssetSelector: import("./types.js").CreateAssetSelector) => ((assetName: string) => import("reselect").OutputSelector<unknown, import("@exodus/currency").default | null, (res1: (name: string) => {
|
|
560
|
+
fuelThreshold?: import("@exodus/currency").default;
|
|
561
|
+
} | undefined, res2: import("./types.js").Asset | undefined) => import("@exodus/currency").default | null>) & lodash.MemoizedFunction;
|
|
562
|
+
readonly dependencies: readonly [{
|
|
563
|
+
readonly module: "feeData";
|
|
564
|
+
readonly selector: "getData";
|
|
565
|
+
}, {
|
|
566
|
+
readonly module: "assets";
|
|
567
|
+
readonly selector: "createAssetSelector";
|
|
568
|
+
}];
|
|
569
|
+
}, {
|
|
570
|
+
readonly id: "createRequiresFuelThreshold";
|
|
571
|
+
readonly selectorFactory: (isTxLogLoadedSelector: import("./types.js").Selector<(account: string) => boolean>, getAssetBalanceSelector: import("./types.js").Selector<import("./types.js").GetBalance>, assetsSelector: import("./types.js").Selector<Record<string, import("./types.js").Asset>>) => (source: {
|
|
572
|
+
assetName: string;
|
|
573
|
+
walletAccount: string;
|
|
574
|
+
}) => import("reselect").OutputSelector<unknown, boolean, (res1: (account: string) => boolean, res2: import("./types.js").GetBalance, res3: Record<string, import("./types.js").Asset>) => boolean>;
|
|
575
|
+
readonly dependencies: readonly [{
|
|
576
|
+
readonly module: "txLog";
|
|
577
|
+
readonly selector: "createIsWalletAccountLoadedSelectorOld";
|
|
578
|
+
}, {
|
|
579
|
+
readonly module: "balances";
|
|
580
|
+
readonly selector: "getAssetSourceBalanceSelector";
|
|
581
|
+
}, {
|
|
582
|
+
readonly module: "availableAssets";
|
|
583
|
+
readonly selector: "all";
|
|
584
|
+
}];
|
|
585
|
+
}];
|
|
586
|
+
};
|
|
587
|
+
export type { BalancesSelectors, State as BalancesState } from './types.js';
|
|
588
|
+
export default balancesReduxDefinition;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import id from './id.js';
|
|
2
|
+
import initialState from './initial-state.js';
|
|
3
|
+
import selectorDefinitions from './selectors/index.js';
|
|
4
|
+
import { mapValues } from '@exodus/basic-utils';
|
|
5
|
+
import lodash from 'lodash';
|
|
6
|
+
import { helperSelectorDefinitions } from './multi-account-helper.js';
|
|
7
|
+
import { setAccounts } from '@exodus/multi-account-redux';
|
|
8
|
+
const { merge } = lodash;
|
|
9
|
+
const mergeChanges = (balancesState, changesByWalletAccount) => {
|
|
10
|
+
return {
|
|
11
|
+
...balancesState,
|
|
12
|
+
...mapValues(changesByWalletAccount, (changesByAsset, walletAccount) => {
|
|
13
|
+
const accountState = balancesState?.[walletAccount];
|
|
14
|
+
if (!accountState) {
|
|
15
|
+
return {
|
|
16
|
+
loaded: true,
|
|
17
|
+
error: null,
|
|
18
|
+
data: mapValues(changesByAsset, (changesByField) => mapValues(changesByField, (balanceField) => balanceField.to)),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const updatedData = mapValues(changesByAsset, (changesByField) => mapValues(changesByField, (balanceField) => balanceField.to));
|
|
22
|
+
return {
|
|
23
|
+
...accountState,
|
|
24
|
+
data: merge({}, accountState.data, updatedData),
|
|
25
|
+
};
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const balancesReduxDefinition = {
|
|
30
|
+
id,
|
|
31
|
+
type: 'redux-module',
|
|
32
|
+
initialState,
|
|
33
|
+
eventReducers: {
|
|
34
|
+
balances: (state, payload) => {
|
|
35
|
+
const { hasBalance, ...walletAccountBalances } = state;
|
|
36
|
+
const accountSlices = walletAccountBalances;
|
|
37
|
+
const balancesLoaded = Object.values(accountSlices).every((value) => value.loaded);
|
|
38
|
+
if (balancesLoaded && payload.changes && Object.keys(payload.changes).length > 0) {
|
|
39
|
+
return mergeChanges(state, payload.changes);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
hasBalance,
|
|
43
|
+
...setAccounts(state, payload.balances),
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
hasBalance: (state, payload) => ({
|
|
47
|
+
...state,
|
|
48
|
+
hasBalance: payload,
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
selectorDefinitions: [...helperSelectorDefinitions, ...selectorDefinitions],
|
|
52
|
+
};
|
|
53
|
+
export default balancesReduxDefinition;
|