@ledgerhq/live-countervalues-react 0.2.44-nightly.0 → 0.2.44-nightly.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +11 -0
- package/lib/index.d.ts +29 -13
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +90 -121
- package/lib/index.js.map +1 -1
- package/lib-es/index.d.ts +29 -13
- package/lib-es/index.d.ts.map +1 -1
- package/lib-es/index.js +83 -114
- package/lib-es/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.tsx +137 -174
package/lib-es/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BigNumber } from "bignumber.js";
|
|
2
|
-
import React, { createContext, useMemo, useContext, useEffect, useReducer, useState, useCallback, } from "react";
|
|
3
1
|
import { getAccountCurrency } from "@ledgerhq/coin-framework/account/helpers";
|
|
4
|
-
import { initialState, calculate, loadCountervalues, exportCountervalues, importCountervalues, inferTrackingPairForAccounts, trackingPairForTopCoins, } from "@ledgerhq/live-countervalues/logic";
|
|
5
2
|
import api from "@ledgerhq/live-countervalues/api/index";
|
|
3
|
+
import { calculate, exportCountervalues, importCountervalues, inferTrackingPairForAccounts, initialState, loadCountervalues, trackingPairForTopCoins, } from "@ledgerhq/live-countervalues/logic";
|
|
6
4
|
import { useDebounce } from "@ledgerhq/live-hooks/useDebounce";
|
|
7
5
|
import { log } from "@ledgerhq/logs";
|
|
6
|
+
import { BigNumber } from "bignumber.js";
|
|
7
|
+
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState, } from "react";
|
|
8
8
|
const CountervaluesPollingContext = createContext({
|
|
9
9
|
wipe: () => { },
|
|
10
10
|
poll: () => { },
|
|
@@ -30,70 +30,53 @@ function trackingPairsHash(a) {
|
|
|
30
30
|
}
|
|
31
31
|
const marketcapRefresh = 30 * 60000;
|
|
32
32
|
const marketcapRefreshOnError = 60000;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function useMarketcap() {
|
|
39
|
-
const [ids, setIds] = useState(initialIds);
|
|
40
|
-
const [fetchNonce, setFetchNonce] = useState(0);
|
|
33
|
+
/** Provides market-cap ids via the supplied bridge. */
|
|
34
|
+
export function CountervaluesMarketcapProvider({ children, bridge, }) {
|
|
35
|
+
const ids = bridge.useIds();
|
|
36
|
+
const lastUpdated = bridge.useLastUpdated();
|
|
37
|
+
const [, forceUpdate] = useReducer(x => x + 1, 0);
|
|
41
38
|
useEffect(() => {
|
|
42
39
|
let timeout = null;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
const now = Date.now();
|
|
41
|
+
if (!lastUpdated || now - lastUpdated > marketcapRefresh) {
|
|
42
|
+
bridge.setLoading(true);
|
|
43
|
+
api.fetchIdsSortedByMarketcap().then(fetchedIds => {
|
|
44
|
+
bridge.setIds(fetchedIds);
|
|
45
|
+
timeout = setTimeout(() => forceUpdate(), marketcapRefresh);
|
|
46
|
+
}, error => {
|
|
47
|
+
log("countervalues", "error fetching marketcap ids " + error);
|
|
48
|
+
bridge.setError(error.message);
|
|
49
|
+
timeout = setTimeout(() => forceUpdate(), marketcapRefreshOnError);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
timeout = setTimeout(() => forceUpdate(), marketcapRefresh - (now - lastUpdated));
|
|
54
|
+
}
|
|
50
55
|
return () => {
|
|
51
|
-
if (timeout)
|
|
56
|
+
if (timeout)
|
|
52
57
|
clearTimeout(timeout);
|
|
53
|
-
}
|
|
54
58
|
};
|
|
55
|
-
}, [
|
|
56
|
-
return ids;
|
|
57
|
-
}
|
|
58
|
-
// infer the tracking pairs for the top coins that the portfolio needs to display itself
|
|
59
|
-
// if startDate is undefined, the feature is disabled
|
|
60
|
-
export function useTrackingPairsForTopCoins(marketcapIds, countervalue, size, startDate) {
|
|
61
|
-
const dateTimestamp = startDate?.getTime();
|
|
62
|
-
return useMemo(() => dateTimestamp
|
|
63
|
-
? trackingPairForTopCoins(marketcapIds, size, countervalue, new Date(dateTimestamp))
|
|
64
|
-
: [], [marketcapIds, countervalue, dateTimestamp, size]);
|
|
65
|
-
}
|
|
66
|
-
export function useTrackingPairForAccounts(accounts, countervalue) {
|
|
67
|
-
// first we cache the tracking pairs with its hash
|
|
68
|
-
const c = useMemo(() => {
|
|
69
|
-
const pairs = inferTrackingPairForAccounts(accounts, countervalue);
|
|
70
|
-
return { pairs, hash: trackingPairsHash(pairs) };
|
|
71
|
-
}, [accounts, countervalue]);
|
|
72
|
-
// we only want to return the pairs when the hash changes
|
|
73
|
-
// to not recalculate pairs as fast as accounts resynchronizes
|
|
74
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
-
return useMemo(() => c.pairs, [c.hash]);
|
|
59
|
+
}, [lastUpdated, bridge]);
|
|
60
|
+
return (React.createElement(CountervaluesMarketcapIdsContext.Provider, { value: ids }, children));
|
|
76
61
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
export function Countervalues({ children, userSettings, pollInitDelay = 3 * 1000, debounceDelay = 1000, savedState, }) {
|
|
62
|
+
/**
|
|
63
|
+
* Root countervalues provider (polling + calculation).
|
|
64
|
+
*/
|
|
65
|
+
export function CountervaluesProvider({ children, userSettings, pollInitDelay = 3 * 1000, debounceDelay = 1000, savedState, }) {
|
|
82
66
|
const autopollInterval = userSettings.refreshRate;
|
|
83
67
|
const debouncedUserSettings = useDebounce(userSettings, debounceDelay);
|
|
84
68
|
const [{ state, pending, error }, dispatch] = useReducer(fetchReducer, initialFetchState);
|
|
69
|
+
// TODO this is always using the initial value, doesn't react to changes.
|
|
85
70
|
const marketcapIds = useContext(CountervaluesMarketcapIdsContext);
|
|
86
71
|
const { marketCapBatchingAfterRank } = userSettings;
|
|
87
|
-
const batchStrategySolver = useMemo(() => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
};
|
|
96
|
-
}, [marketCapBatchingAfterRank, marketcapIds]);
|
|
72
|
+
const batchStrategySolver = useMemo(() => ({
|
|
73
|
+
shouldBatchCurrencyFrom: (currency) => {
|
|
74
|
+
if (currency.type === "FiatCurrency")
|
|
75
|
+
return false;
|
|
76
|
+
const i = marketcapIds.indexOf(currency.id);
|
|
77
|
+
return i === -1 || i > marketCapBatchingAfterRank;
|
|
78
|
+
},
|
|
79
|
+
}), [marketCapBatchingAfterRank, marketcapIds]);
|
|
97
80
|
// flag used to trigger a loadCountervalues
|
|
98
81
|
const [triggerLoad, setTriggerLoad] = useState(false);
|
|
99
82
|
// trigger poll only when userSettings changes. in a debounced way.
|
|
@@ -105,20 +88,8 @@ export function Countervalues({ children, userSettings, pollInitDelay = 3 * 1000
|
|
|
105
88
|
if (pending || !triggerLoad)
|
|
106
89
|
return;
|
|
107
90
|
setTriggerLoad(false);
|
|
108
|
-
dispatch({
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
loadCountervalues(state, userSettings, batchStrategySolver, userSettings.granularitiesRates).then(state => {
|
|
112
|
-
dispatch({
|
|
113
|
-
type: "success",
|
|
114
|
-
payload: state,
|
|
115
|
-
});
|
|
116
|
-
}, error => {
|
|
117
|
-
dispatch({
|
|
118
|
-
type: "error",
|
|
119
|
-
payload: error,
|
|
120
|
-
});
|
|
121
|
-
});
|
|
91
|
+
dispatch({ type: "pending" });
|
|
92
|
+
loadCountervalues(state, userSettings, batchStrategySolver, userSettings.granularitiesRates).then(newState => dispatch({ type: "success", payload: newState }), e => dispatch({ type: "error", payload: e }));
|
|
122
93
|
}, [pending, state, userSettings, triggerLoad, batchStrategySolver]);
|
|
123
94
|
// save the state when it changes
|
|
124
95
|
useEffect(() => {
|
|
@@ -127,8 +98,8 @@ export function Countervalues({ children, userSettings, pollInitDelay = 3 * 1000
|
|
|
127
98
|
dispatch({
|
|
128
99
|
type: "setCounterValueState",
|
|
129
100
|
payload: importCountervalues(savedState, userSettings),
|
|
130
|
-
});
|
|
131
|
-
}, [savedState]);
|
|
101
|
+
});
|
|
102
|
+
}, [savedState, userSettings]);
|
|
132
103
|
// manage the auto polling loop and the interface for user land to trigger a reload
|
|
133
104
|
const [isPolling, setIsPolling] = useState(true);
|
|
134
105
|
useEffect(() => {
|
|
@@ -143,11 +114,7 @@ export function Countervalues({ children, userSettings, pollInitDelay = 3 * 1000
|
|
|
143
114
|
return () => clearTimeout(pollingTimeout);
|
|
144
115
|
}, [autopollInterval, pollInitDelay, isPolling]);
|
|
145
116
|
const polling = useMemo(() => ({
|
|
146
|
-
wipe: () => {
|
|
147
|
-
dispatch({
|
|
148
|
-
type: "wipe",
|
|
149
|
-
});
|
|
150
|
-
},
|
|
117
|
+
wipe: () => dispatch({ type: "wipe" }),
|
|
151
118
|
poll: () => setTriggerLoad(true),
|
|
152
119
|
start: () => setIsPolling(true),
|
|
153
120
|
stop: () => setIsPolling(false),
|
|
@@ -158,34 +125,31 @@ export function Countervalues({ children, userSettings, pollInitDelay = 3 * 1000
|
|
|
158
125
|
React.createElement(CountervaluesUserSettingsContext.Provider, { value: userSettings },
|
|
159
126
|
React.createElement(CountervaluesContext.Provider, { value: state }, children))));
|
|
160
127
|
}
|
|
161
|
-
const initialFetchState = {
|
|
162
|
-
state: initialState,
|
|
163
|
-
pending: false,
|
|
164
|
-
};
|
|
128
|
+
const initialFetchState = { state: initialState, pending: false };
|
|
165
129
|
function fetchReducer(state, action) {
|
|
166
130
|
switch (action.type) {
|
|
167
131
|
case "success":
|
|
168
|
-
return {
|
|
169
|
-
state: action.payload,
|
|
170
|
-
pending: false,
|
|
171
|
-
error: undefined,
|
|
172
|
-
};
|
|
132
|
+
return { state: action.payload, pending: false, error: undefined };
|
|
173
133
|
case "error":
|
|
174
134
|
return { ...state, pending: false, error: action.payload };
|
|
175
135
|
case "pending":
|
|
176
136
|
return { ...state, pending: true, error: undefined };
|
|
177
137
|
case "wipe":
|
|
178
|
-
return {
|
|
179
|
-
state: initialState,
|
|
180
|
-
pending: false,
|
|
181
|
-
error: undefined,
|
|
182
|
-
};
|
|
138
|
+
return { state: initialState, pending: false, error: undefined };
|
|
183
139
|
case "setCounterValueState":
|
|
184
140
|
return { ...state, state: action.payload };
|
|
185
141
|
default:
|
|
186
142
|
return state;
|
|
187
143
|
}
|
|
188
144
|
}
|
|
145
|
+
/** Returns market-cap ids. */
|
|
146
|
+
export function useMarketcapIds() {
|
|
147
|
+
return useContext(CountervaluesMarketcapIdsContext);
|
|
148
|
+
}
|
|
149
|
+
/** Returns the full countervalues state. */
|
|
150
|
+
export function useCountervaluesState() {
|
|
151
|
+
return useContext(CountervaluesContext);
|
|
152
|
+
}
|
|
189
153
|
// allows consumer to access the countervalues polling control object
|
|
190
154
|
export function useCountervaluesPolling() {
|
|
191
155
|
return useContext(CountervaluesPollingContext);
|
|
@@ -194,17 +158,9 @@ export function useCountervaluesPolling() {
|
|
|
194
158
|
export function useCountervaluesUserSettingsContext() {
|
|
195
159
|
return useContext(CountervaluesUserSettingsContext);
|
|
196
160
|
}
|
|
197
|
-
// allows consumer to access the countervalues state
|
|
198
|
-
export function useCountervaluesState() {
|
|
199
|
-
return useContext(CountervaluesContext);
|
|
200
|
-
}
|
|
201
|
-
// allows consumer to access the coins ids sorted by marketcap. It's basically all the coins that the API supports.
|
|
202
|
-
export function useMarketcapIds() {
|
|
203
|
-
return useContext(CountervaluesMarketcapIdsContext);
|
|
204
|
-
}
|
|
205
161
|
// provides an export of the countervalues state
|
|
206
162
|
export function useCountervaluesExport() {
|
|
207
|
-
const state =
|
|
163
|
+
const state = useCountervaluesState();
|
|
208
164
|
return useMemo(() => exportCountervalues(state), [state]);
|
|
209
165
|
}
|
|
210
166
|
// provides a way to calculate a countervalue from a value
|
|
@@ -225,6 +181,7 @@ export function useCalculateCountervalueCallback({ to, }) {
|
|
|
225
181
|
return typeof countervalue === "number" ? new BigNumber(countervalue) : countervalue;
|
|
226
182
|
}, [to, state]);
|
|
227
183
|
}
|
|
184
|
+
/** Helper for send-flow: returns fiat amount and reverse calculation. */
|
|
228
185
|
export function useSendAmount({ account, fiatCurrency, cryptoAmount, }) {
|
|
229
186
|
const cryptoCurrency = getAccountCurrency(account);
|
|
230
187
|
const fiatCountervalue = useCalculate({
|
|
@@ -236,19 +193,31 @@ export function useSendAmount({ account, fiatCurrency, cryptoAmount, }) {
|
|
|
236
193
|
const fiatAmount = new BigNumber(fiatCountervalue ?? 0);
|
|
237
194
|
const fiatUnit = fiatCurrency.units[0];
|
|
238
195
|
const state = useCountervaluesState();
|
|
239
|
-
const calculateCryptoAmount = useCallback((fiatAmount) => {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
196
|
+
const calculateCryptoAmount = useCallback((fiatAmount) => new BigNumber(calculate(state, {
|
|
197
|
+
from: cryptoCurrency,
|
|
198
|
+
to: fiatCurrency,
|
|
199
|
+
value: fiatAmount.toNumber(),
|
|
200
|
+
reverse: true,
|
|
201
|
+
}) ?? 0), [state, cryptoCurrency, fiatCurrency]);
|
|
202
|
+
return { fiatAmount, fiatUnit, calculateCryptoAmount };
|
|
203
|
+
}
|
|
204
|
+
// infer the tracking pairs for the top coins that the portfolio needs to display itself
|
|
205
|
+
// if startDate is undefined, the feature is disabled
|
|
206
|
+
export function useTrackingPairsForTopCoins(marketcapIds, countervalue, size, startDate) {
|
|
207
|
+
const dateTimestamp = startDate?.getTime();
|
|
208
|
+
return useMemo(() => dateTimestamp
|
|
209
|
+
? trackingPairForTopCoins(marketcapIds, size, countervalue, new Date(dateTimestamp))
|
|
210
|
+
: [], [marketcapIds, countervalue, dateTimestamp, size]);
|
|
211
|
+
}
|
|
212
|
+
export function useTrackingPairForAccounts(accounts, countervalue) {
|
|
213
|
+
// first we cache the tracking pairs with its hash
|
|
214
|
+
const c = useMemo(() => {
|
|
215
|
+
const pairs = inferTrackingPairForAccounts(accounts, countervalue);
|
|
216
|
+
return { pairs, hash: trackingPairsHash(pairs) };
|
|
217
|
+
}, [accounts, countervalue]);
|
|
218
|
+
// we only want to return the pairs when the hash changes
|
|
219
|
+
// to not recalculate pairs as fast as accounts resynchronizes
|
|
220
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
221
|
+
return useMemo(() => c.pairs, [c.hash]);
|
|
253
222
|
}
|
|
254
223
|
//# sourceMappingURL=index.js.map
|
package/lib-es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,GAAG,MAAM,wCAAwC,CAAC;AACzD,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAO5C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,EAEZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,GACT,MAAM,OAAO,CAAC;AAyCf,MAAM,2BAA2B,GAAG,aAAa,CAAU;IACzD,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,I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YAAsB,EACtB,YAAsB,EACtB,IAAY,EACZ,SAA2B;IAE3B,MAAM,aAAa,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC;IAC3C,OAAO,OAAO,CACZ,GAAG,EAAE,CACH,aAAa;QACX,CAAC,CAAC,uBAAuB,CAAC,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC;QACpF,CAAC,CAAC,EAAE,EACR,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,CAAC,CAClD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,QAAmB,EACnB,YAAsB;IAEtB,kDAAkD;IAClD,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE;QACrB,MAAM,KAAK,GAAG,4BAA4B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACnE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;IACnD,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC7B,yDAAyD;IACzD,8DAA8D;IAC9D,uDAAuD;IACvD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-countervalues-react",
|
|
3
|
-
"version": "0.2.44-nightly.
|
|
3
|
+
"version": "0.2.44-nightly.1",
|
|
4
4
|
"description": "Ledger Live countervalues React module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"bignumber.js": "9",
|
|
28
28
|
"@ledgerhq/types-live": "6.78.1-nightly.0",
|
|
29
|
-
"@ledgerhq/
|
|
30
|
-
"@ledgerhq/cryptoassets": "13.22.0",
|
|
29
|
+
"@ledgerhq/cryptoassets": "13.22.1-nightly.0",
|
|
31
30
|
"@ledgerhq/logs": "6.13.0",
|
|
32
|
-
"@ledgerhq/live-countervalues": "0.5.15-nightly.
|
|
33
|
-
"@ledgerhq/
|
|
31
|
+
"@ledgerhq/live-countervalues": "0.5.15-nightly.1",
|
|
32
|
+
"@ledgerhq/types-cryptoassets": "7.24.0-nightly.0",
|
|
33
|
+
"@ledgerhq/coin-framework": "5.7.1-nightly.1",
|
|
34
34
|
"@ledgerhq/live-hooks": "0.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|