@ledgerhq/live-common 34.55.0-nightly.20251210100832 → 34.55.0-nightly.20251210120335
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/lib/bridge/react/BridgeSync.d.ts +1 -1
- package/lib/bridge/react/BridgeSync.d.ts.map +1 -1
- package/lib/bridge/react/BridgeSync.js.map +1 -1
- package/lib/deposit/api.js +2 -2
- package/lib/deposit/api.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyAll.js +2 -2
- package/lib/exchange/swap/api/v5/fetchCurrencyAll.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js +2 -2
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.js +2 -2
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchRates.js +2 -2
- package/lib/exchange/swap/api/v5/fetchRates.js.map +1 -1
- package/lib/families/bitcoin/bridge/api.js +2 -2
- package/lib/families/bitcoin/bridge/api.js.map +1 -1
- package/lib/featureFlags/FeatureToggle.d.ts +2 -2
- package/lib/featureFlags/FeatureToggle.d.ts.map +1 -1
- package/lib/featureFlags/FeatureToggle.js.map +1 -1
- package/lib/hw/isFirmwareUpdateVersionSupported.d.ts +2 -2
- package/lib/hw/isFirmwareUpdateVersionSupported.d.ts.map +1 -1
- package/lib/hw/isFirmwareUpdateVersionSupported.js +20 -7
- package/lib/hw/isFirmwareUpdateVersionSupported.js.map +1 -1
- package/lib/market/api/index.d.ts.map +1 -1
- package/lib/market/api/index.js +7 -7
- package/lib/market/api/index.js.map +1 -1
- package/lib/market/utils/types.d.ts +5 -0
- package/lib/market/utils/types.d.ts.map +1 -1
- package/lib/market/utils/types.js.map +1 -1
- package/lib/notifications/AnnouncementProvider/api/api.js +2 -2
- package/lib/notifications/AnnouncementProvider/api/api.js.map +1 -1
- package/lib/notifications/ServiceStatusProvider/api/api.js +2 -2
- package/lib/notifications/ServiceStatusProvider/api/api.js.map +1 -1
- package/lib/platform/providers/RampCatalogProvider/api/index.js +2 -2
- package/lib/platform/providers/RampCatalogProvider/api/index.js.map +1 -1
- package/lib/platform/providers/RampCatalogProvider/index.d.ts +1 -1
- package/lib/platform/providers/RampCatalogProvider/index.d.ts.map +1 -1
- package/lib/platform/providers/RemoteLiveAppProvider/index.d.ts +1 -1
- package/lib/platform/providers/RemoteLiveAppProvider/index.d.ts.map +1 -1
- package/lib/wallet-api/LocalLiveAppProvider/index.d.ts +1 -1
- package/lib/wallet-api/LocalLiveAppProvider/index.d.ts.map +1 -1
- package/lib-es/bridge/react/BridgeSync.d.ts +1 -1
- package/lib-es/bridge/react/BridgeSync.d.ts.map +1 -1
- package/lib-es/bridge/react/BridgeSync.js.map +1 -1
- package/lib-es/deposit/api.js +1 -1
- package/lib-es/deposit/api.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyAll.js +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyAll.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.js +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchRates.js +1 -1
- package/lib-es/exchange/swap/api/v5/fetchRates.js.map +1 -1
- package/lib-es/families/bitcoin/bridge/api.js +1 -1
- package/lib-es/families/bitcoin/bridge/api.js.map +1 -1
- package/lib-es/featureFlags/FeatureToggle.d.ts +2 -2
- package/lib-es/featureFlags/FeatureToggle.d.ts.map +1 -1
- package/lib-es/featureFlags/FeatureToggle.js.map +1 -1
- package/lib-es/hw/isFirmwareUpdateVersionSupported.d.ts +2 -2
- package/lib-es/hw/isFirmwareUpdateVersionSupported.d.ts.map +1 -1
- package/lib-es/hw/isFirmwareUpdateVersionSupported.js +17 -7
- package/lib-es/hw/isFirmwareUpdateVersionSupported.js.map +1 -1
- package/lib-es/market/api/index.d.ts.map +1 -1
- package/lib-es/market/api/index.js +1 -1
- package/lib-es/market/api/index.js.map +1 -1
- package/lib-es/market/utils/types.d.ts +5 -0
- package/lib-es/market/utils/types.d.ts.map +1 -1
- package/lib-es/market/utils/types.js.map +1 -1
- package/lib-es/notifications/AnnouncementProvider/api/api.js +1 -1
- package/lib-es/notifications/AnnouncementProvider/api/api.js.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/api/api.js +1 -1
- package/lib-es/notifications/ServiceStatusProvider/api/api.js.map +1 -1
- package/lib-es/platform/providers/RampCatalogProvider/api/index.js +1 -1
- package/lib-es/platform/providers/RampCatalogProvider/api/index.js.map +1 -1
- package/lib-es/platform/providers/RampCatalogProvider/index.d.ts +1 -1
- package/lib-es/platform/providers/RampCatalogProvider/index.d.ts.map +1 -1
- package/lib-es/platform/providers/RemoteLiveAppProvider/index.d.ts +1 -1
- package/lib-es/platform/providers/RemoteLiveAppProvider/index.d.ts.map +1 -1
- package/lib-es/wallet-api/LocalLiveAppProvider/index.d.ts +1 -1
- package/lib-es/wallet-api/LocalLiveAppProvider/index.d.ts.map +1 -1
- package/package.json +73 -73
- package/src/bridge/react/BridgeSync.tsx +1 -1
- package/src/deposit/api.ts +2 -2
- package/src/exchange/swap/api/v5/__tests__/fetchCurrencyAll.spec.ts +1 -1
- package/src/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.ts +1 -1
- package/src/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.ts +1 -1
- package/src/exchange/swap/api/v5/fetchCurrencyAll.ts +1 -1
- package/src/exchange/swap/api/v5/fetchCurrencyFrom.ts +1 -1
- package/src/exchange/swap/api/v5/fetchCurrencyTo.ts +1 -1
- package/src/exchange/swap/api/v5/fetchRates.ts +1 -1
- package/src/families/bitcoin/bridge/api.ts +2 -2
- package/src/featureFlags/FeatureToggle.tsx +1 -1
- package/src/hw/isFirmwareUpdateVersionSupported.test.ts +36 -32
- package/src/hw/isFirmwareUpdateVersionSupported.ts +23 -8
- package/src/market/api/index.ts +8 -7
- package/src/market/utils/types.ts +6 -0
- package/src/notifications/AnnouncementProvider/api/api.ts +2 -2
- package/src/notifications/ServiceStatusProvider/api/api.ts +2 -2
- package/src/platform/providers/RampCatalogProvider/api/index.ts +3 -3
- package/src/platform/providers/RampCatalogProvider/index.tsx +1 -1
- package/src/platform/providers/RemoteLiveAppProvider/index.tsx +1 -1
- package/src/wallet-api/LocalLiveAppProvider/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-common",
|
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
|
4
|
-
"version": "34.55.0-nightly.
|
|
4
|
+
"version": "34.55.0-nightly.20251210120335",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -176,78 +176,78 @@
|
|
|
176
176
|
"xstate": "^5.19.2",
|
|
177
177
|
"yargs": "^17.0.0",
|
|
178
178
|
"zod": "^3.22.4",
|
|
179
|
-
"@ledgerhq/coin-
|
|
180
|
-
"@ledgerhq/coin-
|
|
181
|
-
"@ledgerhq/coin-bitcoin": "^0.27.0-nightly.
|
|
182
|
-
"@ledgerhq/coin-canton": "^0.12.0-nightly.
|
|
183
|
-
"@ledgerhq/coin-cardano": "^0.16.0-nightly.
|
|
184
|
-
"@ledgerhq/coin-casper": "^2.5.0-nightly.
|
|
185
|
-
"@ledgerhq/coin-celo": "^1.8.0-nightly.
|
|
186
|
-
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.
|
|
187
|
-
"@ledgerhq/coin-evm": "^2.37.0-nightly.
|
|
188
|
-
"@ledgerhq/coin-filecoin": "^1.16.0-nightly.
|
|
189
|
-
"@ledgerhq/coin-framework": "^6.11.0-nightly.
|
|
190
|
-
"@ledgerhq/coin-hedera": "^1.16.0-nightly.
|
|
191
|
-
"@ledgerhq/coin-icon": "^0.16.0-nightly.
|
|
192
|
-
"@ledgerhq/coin-internet_computer": "^1.12.0-nightly.
|
|
193
|
-
"@ledgerhq/coin-kaspa": "^1.6.0-nightly.
|
|
194
|
-
"@ledgerhq/coin-mina": "^1.5.0-nightly.
|
|
195
|
-
"@ledgerhq/coin-multiversx": "^0.9.0-nightly.
|
|
196
|
-
"@ledgerhq/coin-near": "^0.17.0-nightly.
|
|
197
|
-
"@ledgerhq/coin-polkadot": "^6.14.0-nightly.
|
|
198
|
-
"@ledgerhq/coin-solana": "^0.39.0-nightly.
|
|
199
|
-
"@ledgerhq/coin-stacks": "^0.13.0-nightly.
|
|
200
|
-
"@ledgerhq/coin-stellar": "^6.9.0-nightly.
|
|
201
|
-
"@ledgerhq/coin-sui": "^0.19.0-nightly.
|
|
202
|
-
"@ledgerhq/coin-tezos": "^6.11.0-nightly.
|
|
203
|
-
"@ledgerhq/coin-ton": "^0.18.0-nightly.
|
|
204
|
-
"@ledgerhq/coin-tron": "^5.8.0-nightly.
|
|
205
|
-
"@ledgerhq/coin-vechain": "^2.14.0-nightly.
|
|
206
|
-
"@ledgerhq/coin-xrp": "^7.10.0-nightly.
|
|
207
|
-
"@ledgerhq/cryptoassets": "^13.35.0-nightly.
|
|
208
|
-
"@ledgerhq/device-core": "^0.6.10-nightly.
|
|
209
|
-
"@ledgerhq/devices": "8.8.0-nightly.
|
|
210
|
-
"@ledgerhq/errors": "^6.28.0-nightly.
|
|
211
|
-
"@ledgerhq/hw-app-algorand": "^6.31.10-nightly.
|
|
212
|
-
"@ledgerhq/hw-app-aptos": "^6.34.10-nightly.
|
|
213
|
-
"@ledgerhq/hw-app-btc": "^10.14.0-nightly.
|
|
214
|
-
"@ledgerhq/hw-app-celo": "^6.35.5-nightly.
|
|
215
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.10-nightly.
|
|
216
|
-
"@ledgerhq/hw-app-eth": "^7.1.0-nightly.
|
|
217
|
-
"@ledgerhq/hw-app-exchange": "^0.18.1-nightly.
|
|
218
|
-
"@ledgerhq/hw-app-hedera": "^1.2.10-nightly.
|
|
219
|
-
"@ledgerhq/hw-app-icon": "^1.3.10-nightly.
|
|
220
|
-
"@ledgerhq/hw-app-kaspa": "^1.3.3-nightly.
|
|
221
|
-
"@ledgerhq/hw-app-multiversx": "^6.26.1-nightly.
|
|
222
|
-
"@ledgerhq/hw-app-near": "^6.31.10-nightly.
|
|
223
|
-
"@ledgerhq/hw-app-polkadot": "^6.34.10-nightly.
|
|
224
|
-
"@ledgerhq/hw-app-str": "^7.2.10-nightly.
|
|
179
|
+
"@ledgerhq/coin-algorand": "^0.15.0-nightly.20251210120335",
|
|
180
|
+
"@ledgerhq/coin-aptos": "^3.8.0-nightly.20251210120335",
|
|
181
|
+
"@ledgerhq/coin-bitcoin": "^0.27.0-nightly.20251210120335",
|
|
182
|
+
"@ledgerhq/coin-canton": "^0.12.0-nightly.20251210120335",
|
|
183
|
+
"@ledgerhq/coin-cardano": "^0.16.0-nightly.20251210120335",
|
|
184
|
+
"@ledgerhq/coin-casper": "^2.5.0-nightly.20251210120335",
|
|
185
|
+
"@ledgerhq/coin-celo": "^1.8.0-nightly.20251210120335",
|
|
186
|
+
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.20251210120335",
|
|
187
|
+
"@ledgerhq/coin-evm": "^2.37.0-nightly.20251210120335",
|
|
188
|
+
"@ledgerhq/coin-filecoin": "^1.16.0-nightly.20251210120335",
|
|
189
|
+
"@ledgerhq/coin-framework": "^6.11.0-nightly.20251210120335",
|
|
190
|
+
"@ledgerhq/coin-hedera": "^1.16.0-nightly.20251210120335",
|
|
191
|
+
"@ledgerhq/coin-icon": "^0.16.0-nightly.20251210120335",
|
|
192
|
+
"@ledgerhq/coin-internet_computer": "^1.12.0-nightly.20251210120335",
|
|
193
|
+
"@ledgerhq/coin-kaspa": "^1.6.0-nightly.20251210120335",
|
|
194
|
+
"@ledgerhq/coin-mina": "^1.5.0-nightly.20251210120335",
|
|
195
|
+
"@ledgerhq/coin-multiversx": "^0.9.0-nightly.20251210120335",
|
|
196
|
+
"@ledgerhq/coin-near": "^0.17.0-nightly.20251210120335",
|
|
197
|
+
"@ledgerhq/coin-polkadot": "^6.14.0-nightly.20251210120335",
|
|
198
|
+
"@ledgerhq/coin-solana": "^0.39.0-nightly.20251210120335",
|
|
199
|
+
"@ledgerhq/coin-stacks": "^0.13.0-nightly.20251210120335",
|
|
200
|
+
"@ledgerhq/coin-stellar": "^6.9.0-nightly.20251210120335",
|
|
201
|
+
"@ledgerhq/coin-sui": "^0.19.0-nightly.20251210120335",
|
|
202
|
+
"@ledgerhq/coin-tezos": "^6.11.0-nightly.20251210120335",
|
|
203
|
+
"@ledgerhq/coin-ton": "^0.18.0-nightly.20251210120335",
|
|
204
|
+
"@ledgerhq/coin-tron": "^5.8.0-nightly.20251210120335",
|
|
205
|
+
"@ledgerhq/coin-vechain": "^2.14.0-nightly.20251210120335",
|
|
206
|
+
"@ledgerhq/coin-xrp": "^7.10.0-nightly.20251210120335",
|
|
207
|
+
"@ledgerhq/cryptoassets": "^13.35.0-nightly.20251210120335",
|
|
208
|
+
"@ledgerhq/device-core": "^0.6.10-nightly.20251210120335",
|
|
209
|
+
"@ledgerhq/devices": "8.8.0-nightly.20251210120335",
|
|
210
|
+
"@ledgerhq/errors": "^6.28.0-nightly.20251210120335",
|
|
211
|
+
"@ledgerhq/hw-app-algorand": "^6.31.10-nightly.20251210120335",
|
|
212
|
+
"@ledgerhq/hw-app-aptos": "^6.34.10-nightly.20251210120335",
|
|
213
|
+
"@ledgerhq/hw-app-btc": "^10.14.0-nightly.20251210120335",
|
|
214
|
+
"@ledgerhq/hw-app-celo": "^6.35.5-nightly.20251210120335",
|
|
215
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.10-nightly.20251210120335",
|
|
216
|
+
"@ledgerhq/hw-app-eth": "^7.1.0-nightly.20251210120335",
|
|
217
|
+
"@ledgerhq/hw-app-exchange": "^0.18.1-nightly.20251210120335",
|
|
218
|
+
"@ledgerhq/hw-app-hedera": "^1.2.10-nightly.20251210120335",
|
|
219
|
+
"@ledgerhq/hw-app-icon": "^1.3.10-nightly.20251210120335",
|
|
220
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.3-nightly.20251210120335",
|
|
221
|
+
"@ledgerhq/hw-app-multiversx": "^6.26.1-nightly.20251210120335",
|
|
222
|
+
"@ledgerhq/hw-app-near": "^6.31.10-nightly.20251210120335",
|
|
223
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.10-nightly.20251210120335",
|
|
224
|
+
"@ledgerhq/hw-app-str": "^7.2.10-nightly.20251210120335",
|
|
225
225
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
226
|
-
"@ledgerhq/hw-app-tezos": "^6.31.10-nightly.
|
|
227
|
-
"@ledgerhq/hw-app-trx": "^6.31.10-nightly.
|
|
228
|
-
"@ledgerhq/hw-app-vet": "^0.8.1-nightly.
|
|
229
|
-
"@ledgerhq/hw-app-xrp": "^6.32.8-nightly.
|
|
230
|
-
"@ledgerhq/hw-bolos": "^6.32.10-nightly.
|
|
231
|
-
"@ledgerhq/hw-transport": "6.31.14-nightly.
|
|
232
|
-
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.
|
|
233
|
-
"@ledgerhq/ledger-cal-service": "^1.9.2-nightly.
|
|
234
|
-
"@ledgerhq/ledger-trust-service": "^0.4.4-nightly.
|
|
235
|
-
"@ledgerhq/live-config": "^3.3.0-nightly.
|
|
236
|
-
"@ledgerhq/live-countervalues": "^0.10.2-nightly.
|
|
237
|
-
"@ledgerhq/live-countervalues-react": "^0.7.4-nightly.
|
|
238
|
-
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.
|
|
239
|
-
"@ledgerhq/live-env": "^2.23.0-nightly.
|
|
240
|
-
"@ledgerhq/live-hooks": "0.3.0-nightly.
|
|
241
|
-
"@ledgerhq/live-network": "^2.1.3-nightly.
|
|
226
|
+
"@ledgerhq/hw-app-tezos": "^6.31.10-nightly.20251210120335",
|
|
227
|
+
"@ledgerhq/hw-app-trx": "^6.31.10-nightly.20251210120335",
|
|
228
|
+
"@ledgerhq/hw-app-vet": "^0.8.1-nightly.20251210120335",
|
|
229
|
+
"@ledgerhq/hw-app-xrp": "^6.32.8-nightly.20251210120335",
|
|
230
|
+
"@ledgerhq/hw-bolos": "^6.32.10-nightly.20251210120335",
|
|
231
|
+
"@ledgerhq/hw-transport": "6.31.14-nightly.20251210120335",
|
|
232
|
+
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.20251210120335",
|
|
233
|
+
"@ledgerhq/ledger-cal-service": "^1.9.2-nightly.20251210120335",
|
|
234
|
+
"@ledgerhq/ledger-trust-service": "^0.4.4-nightly.20251210120335",
|
|
235
|
+
"@ledgerhq/live-config": "^3.3.0-nightly.20251210120335",
|
|
236
|
+
"@ledgerhq/live-countervalues": "^0.10.2-nightly.20251210120335",
|
|
237
|
+
"@ledgerhq/live-countervalues-react": "^0.7.4-nightly.20251210120335",
|
|
238
|
+
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.20251210120335",
|
|
239
|
+
"@ledgerhq/live-env": "^2.23.0-nightly.20251210120335",
|
|
240
|
+
"@ledgerhq/live-hooks": "0.3.0-nightly.20251210120335",
|
|
241
|
+
"@ledgerhq/live-network": "^2.1.3-nightly.20251210120335",
|
|
242
242
|
"@ledgerhq/live-promise": "^0.1.1",
|
|
243
|
-
"@ledgerhq/live-signer-canton": "^0.5.3-nightly.
|
|
244
|
-
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.
|
|
245
|
-
"@ledgerhq/live-signer-solana": "^0.8.0-nightly.
|
|
246
|
-
"@ledgerhq/live-wallet": "^0.17.0-nightly.
|
|
243
|
+
"@ledgerhq/live-signer-canton": "^0.5.3-nightly.20251210120335",
|
|
244
|
+
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.20251210120335",
|
|
245
|
+
"@ledgerhq/live-signer-solana": "^0.8.0-nightly.20251210120335",
|
|
246
|
+
"@ledgerhq/live-wallet": "^0.17.0-nightly.20251210120335",
|
|
247
247
|
"@ledgerhq/logs": "^6.13.0",
|
|
248
|
-
"@ledgerhq/speculos-transport": "^0.4.0-nightly.
|
|
249
|
-
"@ledgerhq/wallet-api-acre-module": "^0.11.0-nightly.
|
|
250
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.20.0-nightly.
|
|
248
|
+
"@ledgerhq/speculos-transport": "^0.4.0-nightly.20251210120335",
|
|
249
|
+
"@ledgerhq/wallet-api-acre-module": "^0.11.0-nightly.20251210120335",
|
|
250
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.20.0-nightly.20251210120335"
|
|
251
251
|
},
|
|
252
252
|
"devDependencies": {
|
|
253
253
|
"@solana/web3.js": "1.95.4",
|
|
@@ -294,10 +294,10 @@
|
|
|
294
294
|
"undici": "6.19.2",
|
|
295
295
|
"uuid": "^8.3.2",
|
|
296
296
|
"ws": "8.18.3",
|
|
297
|
-
"@ledgerhq/device-react": "^0.3.4-nightly.
|
|
298
|
-
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.
|
|
297
|
+
"@ledgerhq/device-react": "^0.3.4-nightly.20251210120335",
|
|
298
|
+
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251210120335",
|
|
299
299
|
"@ledgerhq/types-devices": "^6.27.0",
|
|
300
|
-
"@ledgerhq/types-live": "^6.91.0-nightly.
|
|
300
|
+
"@ledgerhq/types-live": "^6.91.0-nightly.20251210120335"
|
|
301
301
|
},
|
|
302
302
|
"scripts": {
|
|
303
303
|
"build": "zx ./scripts/build-ts.mjs",
|
package/src/deposit/api.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getEnv } from "@ledgerhq/live-env";
|
|
2
|
-
import network from "@ledgerhq/live-network
|
|
2
|
+
import network from "@ledgerhq/live-network";
|
|
3
3
|
import { MappedAsset } from "./type";
|
|
4
4
|
|
|
5
5
|
const ROOT_PATH = getEnv("MAPPING_SERVICE");
|
|
6
6
|
|
|
7
7
|
export async function getMappedAssets(): Promise<MappedAsset[]> {
|
|
8
8
|
const url = `${ROOT_PATH}/v1/coingecko/mapped-assets`;
|
|
9
|
-
const { data } = await network({ method: "GET", url });
|
|
9
|
+
const { data } = await network<MappedAsset[]>({ method: "GET", url });
|
|
10
10
|
return data;
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { fetchCurrencyAll } from "../fetchCurrencyAll";
|
|
3
3
|
import { fetchCurrencyAllMock } from "../__mocks__/fetchCurrencyAll.mocks";
|
|
4
4
|
import { DEFAULT_SWAP_TIMEOUT_MS } from "../../../const/timeout";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { fetchCurrencyFrom } from "../fetchCurrencyFrom";
|
|
3
3
|
import { fetchCurrencyFromMock } from "../__mocks__/fetchCurrencyFrom.mocks";
|
|
4
4
|
import { DEFAULT_SWAP_TIMEOUT_MS } from "../../../const/timeout";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { DEFAULT_SWAP_TIMEOUT_MS } from "../../const/timeout";
|
|
3
3
|
import { flattenV5CurrenciesToAndFrom } from "../../utils/flattenV5CurrenciesToAndFrom";
|
|
4
4
|
import { fetchCurrencyFromMock } from "./__mocks__/fetchCurrencyFrom.mocks";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { fetchCurrencyToMock } from "./__mocks__/fetchCurrencyTo.mocks";
|
|
3
3
|
import { isIntegrationTestEnv } from "../../utils/isIntegrationTestEnv";
|
|
4
4
|
import { DEFAULT_SWAP_TIMEOUT_MS } from "../../const/timeout";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FeeEstimationFailed } from "@ledgerhq/errors";
|
|
2
2
|
import { makeLRUCache } from "@ledgerhq/live-network/cache";
|
|
3
|
-
import network from "@ledgerhq/live-network
|
|
3
|
+
import network from "@ledgerhq/live-network";
|
|
4
4
|
import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
|
5
5
|
import { BigNumber } from "bignumber.js";
|
|
6
6
|
import invariant from "invariant";
|
|
@@ -13,7 +13,7 @@ const getEstimatedFees: (currency: CryptoCurrency) => Promise<Fees> = makeLRUCac
|
|
|
13
13
|
async currency => {
|
|
14
14
|
const baseURL = blockchainBaseURL(currency);
|
|
15
15
|
invariant(baseURL, `Fees for ${currency.id} are not supported`);
|
|
16
|
-
const { data, status } = await network({
|
|
16
|
+
const { data, status } = await network<Fees>({
|
|
17
17
|
method: "GET",
|
|
18
18
|
url: `${baseURL}/fees`,
|
|
19
19
|
});
|
|
@@ -9,7 +9,7 @@ type Props = {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const FeatureToggle = ({ featureId, fallback, children }: Props): JSX.Element => {
|
|
12
|
+
const FeatureToggle = ({ featureId, fallback, children }: Props): React.JSX.Element => {
|
|
13
13
|
const feature = useFeature(featureId);
|
|
14
14
|
|
|
15
15
|
if (!feature || !feature.enabled) {
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
import { DeviceInfo } from "@ledgerhq/types-live";
|
|
3
|
-
import
|
|
4
|
-
import { setEnv } from "@ledgerhq/live-env";
|
|
3
|
+
import { isBleUpdateSupported, isUsbUpdateSupported } from "./isFirmwareUpdateVersionSupported";
|
|
5
4
|
|
|
6
|
-
const
|
|
5
|
+
const usbSupportedDataset: { [key in DeviceModelId]?: string[] } = {
|
|
7
6
|
nanoS: ["2.0.0", "3.0.0"],
|
|
8
7
|
nanoX: ["1.3.0", "1.3.0-rc1"],
|
|
9
8
|
nanoSP: ["1.0.0", "1.0.0-0", "1.1.1", "1.4.0", "1.1.0-rc1", "1.1.0-rc2"],
|
|
10
9
|
stax: ["1.0.0", "1.0.0rc2", "2.0.2-il0", "1.0.0-rc4"],
|
|
11
10
|
};
|
|
12
11
|
|
|
13
|
-
const
|
|
12
|
+
const usbNotSupportedDataset: { [key in DeviceModelId]?: string[] } = {
|
|
14
13
|
nanoS: ["1.6.0", "1.5.5", "1.5.5-wadus"],
|
|
15
14
|
nanoX: ["1.2.4-5", "1.0.0"],
|
|
16
15
|
nanoSP: ["0.9.9", "0.9.0-rc3"],
|
|
17
16
|
stax: ["0.4.6", "0.0.9-rc.2"],
|
|
18
17
|
};
|
|
19
18
|
|
|
19
|
+
const bleSupportedDataset: { [key in DeviceModelId]?: string[] } = {
|
|
20
|
+
nanoX: ["2.4.0", "2.4.0-rc1"],
|
|
21
|
+
stax: ["0.0.0", "0.0.0-rc1"],
|
|
22
|
+
europa: ["0.0.0", "0.0.0-rc1"],
|
|
23
|
+
apex: ["0.0.0", "0.0.0-rc1"],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const bleNotSupportedDataset: { [key in DeviceModelId]?: string[] } = {
|
|
27
|
+
nanoX: ["2.3.0", "2.3.0-rc1"],
|
|
28
|
+
nanoSP: ["1.0.0", "1.0.0-rc1"],
|
|
29
|
+
nanoS: ["1.6.1", "1.6.0"],
|
|
30
|
+
};
|
|
31
|
+
|
|
20
32
|
describe("Firmware update version availability checks", () => {
|
|
21
33
|
const getDeviceInfo = (version): DeviceInfo => ({
|
|
22
34
|
version,
|
|
@@ -31,50 +43,42 @@ describe("Firmware update version availability checks", () => {
|
|
|
31
43
|
seFlags: Buffer.alloc(0),
|
|
32
44
|
});
|
|
33
45
|
|
|
34
|
-
describe("
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
Object.keys(badDataset).forEach(deviceModelId => {
|
|
40
|
-
badDataset[deviceModelId].forEach(version => {
|
|
46
|
+
describe("USB update not supported", () => {
|
|
47
|
+
Object.keys(usbNotSupportedDataset).forEach(deviceModelId => {
|
|
48
|
+
usbNotSupportedDataset[deviceModelId].forEach(version => {
|
|
41
49
|
const deviceInfo = getDeviceInfo(version);
|
|
42
50
|
it(`testing ${version} for ${deviceModelId}`, () =>
|
|
43
|
-
expect(
|
|
44
|
-
false,
|
|
45
|
-
));
|
|
51
|
+
expect(isUsbUpdateSupported(deviceInfo, deviceModelId as DeviceModelId)).toBe(false));
|
|
46
52
|
});
|
|
47
53
|
});
|
|
48
54
|
});
|
|
49
55
|
|
|
50
|
-
describe("
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
Object.keys(goodDataset).forEach(deviceModelId => {
|
|
56
|
-
goodDataset[deviceModelId].forEach(version => {
|
|
56
|
+
describe("USB update supported", () => {
|
|
57
|
+
Object.keys(usbSupportedDataset).forEach(deviceModelId => {
|
|
58
|
+
usbSupportedDataset[deviceModelId].forEach(version => {
|
|
57
59
|
const deviceInfo = getDeviceInfo(version);
|
|
58
60
|
it(`testing ${version} for ${deviceModelId}`, () =>
|
|
59
|
-
expect(
|
|
60
|
-
true,
|
|
61
|
-
));
|
|
61
|
+
expect(isUsbUpdateSupported(deviceInfo, deviceModelId as DeviceModelId)).toBe(true));
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
describe("
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
describe("BLE update not supported", () => {
|
|
67
|
+
Object.keys(bleNotSupportedDataset).forEach(deviceModelId => {
|
|
68
|
+
bleNotSupportedDataset[deviceModelId].forEach(version => {
|
|
69
|
+
const deviceInfo = getDeviceInfo(version);
|
|
70
|
+
it(`testing ${version} for ${deviceModelId}`, () =>
|
|
71
|
+
expect(isBleUpdateSupported(deviceInfo, deviceModelId as DeviceModelId)).toBe(false));
|
|
72
|
+
});
|
|
69
73
|
});
|
|
74
|
+
});
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
describe("BLE update supported", () => {
|
|
77
|
+
Object.keys(bleSupportedDataset).forEach(deviceModelId => {
|
|
78
|
+
bleSupportedDataset[deviceModelId].forEach(version => {
|
|
73
79
|
const deviceInfo = getDeviceInfo(version);
|
|
74
80
|
it(`testing ${version} for ${deviceModelId}`, () =>
|
|
75
|
-
expect(
|
|
76
|
-
true,
|
|
77
|
-
));
|
|
81
|
+
expect(isBleUpdateSupported(deviceInfo, deviceModelId as DeviceModelId)).toBe(true));
|
|
78
82
|
});
|
|
79
83
|
});
|
|
80
84
|
});
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
import { DeviceInfo } from "@ledgerhq/types-live";
|
|
3
3
|
import { satisfies, coerce } from "semver";
|
|
4
|
-
import { getEnv } from "@ledgerhq/live-env";
|
|
5
4
|
|
|
6
|
-
const
|
|
5
|
+
const usbUpdateSupportedVersions: { [key in DeviceModelId]?: string } = {
|
|
7
6
|
nanoS: ">=1.6.1",
|
|
8
7
|
nanoX: ">=1.3.0",
|
|
9
8
|
nanoSP: ">=1.0.0",
|
|
10
9
|
stax: ">=1.0.0",
|
|
10
|
+
europa: ">=0.0.0",
|
|
11
|
+
apex: ">=0.0.0",
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const bleUpdateSupportedVersions: { [key in DeviceModelId]?: string } = {
|
|
15
|
+
nanoX: ">=2.4.0",
|
|
16
|
+
stax: ">=0.0.0",
|
|
17
|
+
europa: ">=0.0.0",
|
|
18
|
+
apex: ">=0.0.0",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function isUsbUpdateSupported(deviceInfo: DeviceInfo, modelId: DeviceModelId): boolean {
|
|
22
|
+
return (
|
|
23
|
+
Boolean(usbUpdateSupportedVersions[modelId]) &&
|
|
24
|
+
satisfies(coerce(deviceInfo.version), usbUpdateSupportedVersions[modelId])
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function isBleUpdateSupported(deviceInfo: DeviceInfo, modelId: DeviceModelId): boolean {
|
|
29
|
+
return (
|
|
30
|
+
Boolean(bleUpdateSupportedVersions[modelId]) &&
|
|
31
|
+
satisfies(coerce(deviceInfo.version), bleUpdateSupportedVersions[modelId])
|
|
32
|
+
);
|
|
33
|
+
}
|
package/src/market/api/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { getEnv } from "@ledgerhq/live-env";
|
|
3
3
|
import {
|
|
4
4
|
MarketCurrencyChartDataRequestParams,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
SupportedCoins,
|
|
9
9
|
MarketCurrencyRequestParams,
|
|
10
10
|
MarketCoinDataChart,
|
|
11
|
+
MarketChartApiResponse,
|
|
11
12
|
Order,
|
|
12
13
|
} from "../utils/types";
|
|
13
14
|
import { rangeDataTable } from "../utils/rangeDataTable";
|
|
@@ -19,7 +20,7 @@ const ROOT_PATH = getEnv("MARKET_API_URL");
|
|
|
19
20
|
|
|
20
21
|
export async function getSupportedCoinsList(): Promise<SupportedCoins> {
|
|
21
22
|
const url = `${ROOT_PATH}/coins/list`;
|
|
22
|
-
const { data } = await network({ method: "GET", url });
|
|
23
|
+
const { data } = await network<SupportedCoins>({ method: "GET", url });
|
|
23
24
|
return data;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -48,7 +49,7 @@ export async function fetchList({
|
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
51
|
|
|
51
|
-
const { data } = await network({
|
|
52
|
+
const { data } = await network<MarketItemResponse[]>({
|
|
52
53
|
method: "GET",
|
|
53
54
|
url,
|
|
54
55
|
});
|
|
@@ -60,7 +61,7 @@ export async function fetchList({
|
|
|
60
61
|
export async function supportedCounterCurrencies(): Promise<string[]> {
|
|
61
62
|
const url = `${ROOT_PATH}/simple/supported_vs_currencies`;
|
|
62
63
|
|
|
63
|
-
const { data } = await network({
|
|
64
|
+
const { data } = await network<string[]>({
|
|
64
65
|
method: "GET",
|
|
65
66
|
url,
|
|
66
67
|
});
|
|
@@ -84,7 +85,7 @@ export async function fetchCurrencyChartData({
|
|
|
84
85
|
},
|
|
85
86
|
});
|
|
86
87
|
|
|
87
|
-
const { data } = await network({
|
|
88
|
+
const { data } = await network<MarketChartApiResponse>({
|
|
88
89
|
method: "GET",
|
|
89
90
|
url,
|
|
90
91
|
});
|
|
@@ -106,7 +107,7 @@ export async function fetchCurrency({
|
|
|
106
107
|
},
|
|
107
108
|
});
|
|
108
109
|
|
|
109
|
-
const { data } = await network({ method: "GET", url });
|
|
110
|
+
const { data } = await network<MarketItemResponse[]>({ method: "GET", url });
|
|
110
111
|
|
|
111
112
|
return data[0];
|
|
112
113
|
}
|
|
@@ -132,7 +133,7 @@ export async function fetchMarketPerformers({
|
|
|
132
133
|
},
|
|
133
134
|
});
|
|
134
135
|
|
|
135
|
-
const { data } = await network({ method: "GET", url });
|
|
136
|
+
const { data } = await network<MarketItemResponse[]>({ method: "GET", url });
|
|
136
137
|
|
|
137
138
|
return data;
|
|
138
139
|
}
|
|
@@ -10,6 +10,12 @@ export type MarketCoin = {
|
|
|
10
10
|
export type ChartDataPoint = [number, number];
|
|
11
11
|
export type MarketCoinDataChart = Record<string, Array<ChartDataPoint>>;
|
|
12
12
|
|
|
13
|
+
export type MarketChartApiResponse = {
|
|
14
|
+
prices: ChartDataPoint[];
|
|
15
|
+
market_caps: ChartDataPoint[];
|
|
16
|
+
total_volumes: ChartDataPoint[];
|
|
17
|
+
};
|
|
18
|
+
|
|
13
19
|
export enum Order {
|
|
14
20
|
MarketCapDesc = "desc",
|
|
15
21
|
MarketCapAsc = "asc",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { getEnv } from "@ledgerhq/live-env";
|
|
3
3
|
import type { AnnouncementsApi, RawAnnouncement } from "../types";
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ const announcementsVersion = () => getEnv("ANNOUNCEMENTS_API_VERSION");
|
|
|
10
10
|
|
|
11
11
|
async function fetchAnnouncements(): Promise<RawAnnouncement[]> {
|
|
12
12
|
const url = `${baseAnnouncementsUrl()}/v${announcementsVersion()}/data.json?t=${Date.now()}`;
|
|
13
|
-
const { data } = await network({
|
|
13
|
+
const { data } = await network<RawAnnouncement[]>({
|
|
14
14
|
method: "GET",
|
|
15
15
|
headers: {
|
|
16
16
|
Origin: "http://localhost:3000",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { getEnv } from "@ledgerhq/live-env";
|
|
3
3
|
import type { ServiceStatusApi, ServiceStatusSummary } from "../types";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ const statusVersion = () => getEnv("STATUS_API_VERSION");
|
|
|
8
8
|
|
|
9
9
|
async function fetchStatusSummary(): Promise<ServiceStatusSummary> {
|
|
10
10
|
const url = `${baseStatusUrl()}/v${statusVersion()}/summary.json`;
|
|
11
|
-
const { data } = await network({
|
|
11
|
+
const { data } = await network<ServiceStatusSummary>({
|
|
12
12
|
method: "GET",
|
|
13
13
|
url,
|
|
14
14
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import network from "@ledgerhq/live-network
|
|
1
|
+
import network from "@ledgerhq/live-network";
|
|
2
2
|
import { getEnv } from "@ledgerhq/live-env";
|
|
3
3
|
import type { RampCatalog } from "../types";
|
|
4
4
|
import mockData from "./mock.json";
|
|
@@ -10,14 +10,14 @@ const api = {
|
|
|
10
10
|
return mockData as RampCatalog;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const { data } = await network({
|
|
13
|
+
const { data } = await network<RampCatalog>({
|
|
14
14
|
method: "GET",
|
|
15
15
|
headers: {
|
|
16
16
|
Origin: "http://localhost:3000",
|
|
17
17
|
},
|
|
18
18
|
url: `${getEnv("BUY_API_BASE")}/provider/currencies?currency=crypto`,
|
|
19
19
|
});
|
|
20
|
-
return data
|
|
20
|
+
return data;
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -42,7 +42,7 @@ export function useRampCatalogContext() {
|
|
|
42
42
|
export function RampCatalogProvider({
|
|
43
43
|
children,
|
|
44
44
|
updateFrequency,
|
|
45
|
-
}: RampCatalogProviderProps): JSX.Element {
|
|
45
|
+
}: RampCatalogProviderProps): React.JSX.Element {
|
|
46
46
|
const [state, setState] = useState<Loadable<RampCatalog>>(initialState);
|
|
47
47
|
|
|
48
48
|
const updateCatalog = useCallback(async () => {
|
|
@@ -93,7 +93,7 @@ export function RemoteLiveAppProvider({
|
|
|
93
93
|
children,
|
|
94
94
|
parameters,
|
|
95
95
|
updateFrequency,
|
|
96
|
-
}: LiveAppProviderProps): JSX.Element {
|
|
96
|
+
}: LiveAppProviderProps): React.JSX.Element {
|
|
97
97
|
const isMounted = useIsMounted();
|
|
98
98
|
const [state, setState] = useState<Loadable<LiveAppRegistry>>(initialState);
|
|
99
99
|
const [provider, setProvider] = useState<string>(initialProvider);
|
|
@@ -12,7 +12,7 @@ export const liveAppContext = createContext<LiveAppContextType>({
|
|
|
12
12
|
getLocalLiveAppManifestById: id => id,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
export function LocalLiveAppProvider({ children, db }: LiveAppProviderProps): JSX.Element {
|
|
15
|
+
export function LocalLiveAppProvider({ children, db }: LiveAppProviderProps): React.JSX.Element {
|
|
16
16
|
const { state, addLocalManifest, removeLocalManifestById, getLocalLiveAppManifestById } =
|
|
17
17
|
useLocalLiveApp(db);
|
|
18
18
|
|