@ledgerhq/live-common 34.52.0-nightly.9 → 34.52.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/lib/deviceSDK/actions/getBatteryStatuses.d.ts +2 -1
- package/lib/deviceSDK/actions/getBatteryStatuses.d.ts.map +1 -1
- package/lib/deviceSDK/actions/getBatteryStatuses.js +2 -2
- package/lib/deviceSDK/actions/getBatteryStatuses.js.map +1 -1
- package/lib/deviceSDK/actions/getDeviceInfo.d.ts +2 -1
- package/lib/deviceSDK/actions/getDeviceInfo.d.ts.map +1 -1
- package/lib/deviceSDK/actions/getDeviceInfo.js +2 -2
- package/lib/deviceSDK/actions/getDeviceInfo.js.map +1 -1
- package/lib/deviceSDK/actions/getLatestAvailableFirmware.d.ts +2 -1
- package/lib/deviceSDK/actions/getLatestAvailableFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/actions/getLatestAvailableFirmware.js +6 -3
- package/lib/deviceSDK/actions/getLatestAvailableFirmware.js.map +1 -1
- package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts +2 -1
- package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts.map +1 -1
- package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.js +2 -2
- package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.js.map +1 -1
- package/lib/deviceSDK/actions/updateFirmware.d.ts +2 -1
- package/lib/deviceSDK/actions/updateFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/actions/updateFirmware.js +4 -3
- package/lib/deviceSDK/actions/updateFirmware.js.map +1 -1
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useBatteryStatuses.js +3 -2
- package/lib/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib/deviceSDK/hooks/useGetDeviceInfo.d.ts +2 -1
- package/lib/deviceSDK/hooks/useGetDeviceInfo.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useGetDeviceInfo.js +3 -3
- package/lib/deviceSDK/hooks/useGetDeviceInfo.js.map +1 -1
- package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts +2 -1
- package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.js +2 -1
- package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.js.map +1 -1
- package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts +2 -1
- package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js +3 -2
- package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js.map +1 -1
- package/lib/deviceSDK/hooks/useUpdateFirmware.d.ts +2 -1
- package/lib/deviceSDK/hooks/useUpdateFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useUpdateFirmware.js +3 -2
- package/lib/deviceSDK/hooks/useUpdateFirmware.js.map +1 -1
- package/lib/deviceSDK/tasks/getBatteryStatuses.d.ts +1 -0
- package/lib/deviceSDK/tasks/getBatteryStatuses.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getBatteryStatuses.js +2 -2
- package/lib/deviceSDK/tasks/getBatteryStatuses.js.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.d.ts +2 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.js +2 -2
- package/lib/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- package/lib/deviceSDK/tasks/getLatestFirmware.d.ts +1 -0
- package/lib/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getLatestFirmware.js +2 -2
- package/lib/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
- package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts +1 -0
- package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.js +2 -2
- package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.js.map +1 -1
- package/lib/deviceSDK/tasks/updateFirmware.d.ts +1 -0
- package/lib/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/updateFirmware.js +2 -2
- package/lib/deviceSDK/tasks/updateFirmware.js.map +1 -1
- package/lib/deviceSDK/transports/core.d.ts +1 -0
- package/lib/deviceSDK/transports/core.d.ts.map +1 -1
- package/lib/deviceSDK/transports/core.js +2 -2
- package/lib/deviceSDK/transports/core.js.map +1 -1
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +1 -17
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +3 -0
- package/lib/families/canton/config.js.map +1 -1
- package/lib/hw/actions/app.d.ts.map +1 -1
- package/lib/hw/actions/app.js +2 -1
- package/lib/hw/actions/app.js.map +1 -1
- package/lib/hw/actions/customLockScreenLoad.d.ts +1 -1
- package/lib/hw/actions/customLockScreenLoad.d.ts.map +1 -1
- package/lib/hw/actions/customLockScreenLoad.js +2 -0
- package/lib/hw/actions/customLockScreenLoad.js.map +1 -1
- package/lib/hw/actions/implementations.d.ts +1 -0
- package/lib/hw/actions/implementations.d.ts.map +1 -1
- package/lib/hw/actions/implementations.js +12 -2
- package/lib/hw/actions/implementations.js.map +1 -1
- package/lib/hw/connectApp.d.ts +2 -1
- package/lib/hw/connectApp.d.ts.map +1 -1
- package/lib/hw/connectApp.js +4 -4
- package/lib/hw/connectApp.js.map +1 -1
- package/lib/hw/connectManager.d.ts +2 -1
- package/lib/hw/connectManager.d.ts.map +1 -1
- package/lib/hw/connectManager.js +4 -4
- package/lib/hw/connectManager.js.map +1 -1
- package/lib/hw/customLockScreenFetch.d.ts +2 -1
- package/lib/hw/customLockScreenFetch.d.ts.map +1 -1
- package/lib/hw/customLockScreenFetch.js +2 -2
- package/lib/hw/customLockScreenFetch.js.map +1 -1
- package/lib/hw/customLockScreenLoad.d.ts +2 -1
- package/lib/hw/customLockScreenLoad.d.ts.map +1 -1
- package/lib/hw/customLockScreenLoad.js +2 -2
- package/lib/hw/customLockScreenLoad.js.map +1 -1
- package/lib/hw/deviceAccess.d.ts +3 -3
- package/lib/hw/deviceAccess.d.ts.map +1 -1
- package/lib/hw/deviceAccess.js +2 -1
- package/lib/hw/deviceAccess.js.map +1 -1
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts +2 -1
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -1
- package/lib/hw/getGenuineCheckFromDeviceId.js +2 -2
- package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -1
- package/lib/hw/getOnboardingStatePolling.d.ts +2 -1
- package/lib/hw/getOnboardingStatePolling.d.ts.map +1 -1
- package/lib/hw/getOnboardingStatePolling.js +5 -2
- package/lib/hw/getOnboardingStatePolling.js.map +1 -1
- package/lib/hw/hooks/useGenuineCheck.d.ts +2 -1
- package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -1
- package/lib/hw/hooks/useGenuineCheck.js +3 -1
- package/lib/hw/hooks/useGenuineCheck.js.map +1 -1
- package/lib/hw/index.d.ts +6 -2
- package/lib/hw/index.d.ts.map +1 -1
- package/lib/hw/index.js +6 -6
- package/lib/hw/index.js.map +1 -1
- package/lib/hw/installLanguage.d.ts +2 -1
- package/lib/hw/installLanguage.d.ts.map +1 -1
- package/lib/hw/installLanguage.js +2 -2
- package/lib/hw/installLanguage.js.map +1 -1
- package/lib/onboarding/hooks/useOnboardingStatePolling.d.ts.map +1 -1
- package/lib/onboarding/hooks/useOnboardingStatePolling.js +1 -0
- package/lib/onboarding/hooks/useOnboardingStatePolling.js.map +1 -1
- package/lib-es/deviceSDK/actions/getBatteryStatuses.d.ts +2 -1
- package/lib-es/deviceSDK/actions/getBatteryStatuses.d.ts.map +1 -1
- package/lib-es/deviceSDK/actions/getBatteryStatuses.js +2 -2
- package/lib-es/deviceSDK/actions/getBatteryStatuses.js.map +1 -1
- package/lib-es/deviceSDK/actions/getDeviceInfo.d.ts +2 -1
- package/lib-es/deviceSDK/actions/getDeviceInfo.d.ts.map +1 -1
- package/lib-es/deviceSDK/actions/getDeviceInfo.js +2 -2
- package/lib-es/deviceSDK/actions/getDeviceInfo.js.map +1 -1
- package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.d.ts +2 -1
- package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.js +6 -3
- package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.js.map +1 -1
- package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts +2 -1
- package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts.map +1 -1
- package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.js +2 -2
- package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.js.map +1 -1
- package/lib-es/deviceSDK/actions/updateFirmware.d.ts +2 -1
- package/lib-es/deviceSDK/actions/updateFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/actions/updateFirmware.js +4 -3
- package/lib-es/deviceSDK/actions/updateFirmware.js.map +1 -1
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js +3 -2
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib-es/deviceSDK/hooks/useGetDeviceInfo.d.ts +2 -1
- package/lib-es/deviceSDK/hooks/useGetDeviceInfo.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useGetDeviceInfo.js +3 -3
- package/lib-es/deviceSDK/hooks/useGetDeviceInfo.js.map +1 -1
- package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts +2 -1
- package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.js +2 -1
- package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.js.map +1 -1
- package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts +2 -1
- package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js +3 -2
- package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js.map +1 -1
- package/lib-es/deviceSDK/hooks/useUpdateFirmware.d.ts +2 -1
- package/lib-es/deviceSDK/hooks/useUpdateFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useUpdateFirmware.js +3 -2
- package/lib-es/deviceSDK/hooks/useUpdateFirmware.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getBatteryStatuses.d.ts +1 -0
- package/lib-es/deviceSDK/tasks/getBatteryStatuses.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getBatteryStatuses.js +2 -2
- package/lib-es/deviceSDK/tasks/getBatteryStatuses.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts +2 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js +2 -2
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts +1 -0
- package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getLatestFirmware.js +2 -2
- package/lib-es/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
- package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts +1 -0
- package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.js +2 -2
- package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.js.map +1 -1
- package/lib-es/deviceSDK/tasks/updateFirmware.d.ts +1 -0
- package/lib-es/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/updateFirmware.js +2 -2
- package/lib-es/deviceSDK/tasks/updateFirmware.js.map +1 -1
- package/lib-es/deviceSDK/transports/core.d.ts +1 -0
- package/lib-es/deviceSDK/transports/core.d.ts.map +1 -1
- package/lib-es/deviceSDK/transports/core.js +2 -2
- package/lib-es/deviceSDK/transports/core.js.map +1 -1
- package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.js +1 -17
- package/lib-es/exchange/swap/completeExchange.js.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +3 -0
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/hw/actions/app.d.ts.map +1 -1
- package/lib-es/hw/actions/app.js +2 -1
- package/lib-es/hw/actions/app.js.map +1 -1
- package/lib-es/hw/actions/customLockScreenLoad.d.ts +1 -1
- package/lib-es/hw/actions/customLockScreenLoad.d.ts.map +1 -1
- package/lib-es/hw/actions/customLockScreenLoad.js +2 -0
- package/lib-es/hw/actions/customLockScreenLoad.js.map +1 -1
- package/lib-es/hw/actions/implementations.d.ts +1 -0
- package/lib-es/hw/actions/implementations.d.ts.map +1 -1
- package/lib-es/hw/actions/implementations.js +12 -2
- package/lib-es/hw/actions/implementations.js.map +1 -1
- package/lib-es/hw/connectApp.d.ts +2 -1
- package/lib-es/hw/connectApp.d.ts.map +1 -1
- package/lib-es/hw/connectApp.js +4 -4
- package/lib-es/hw/connectApp.js.map +1 -1
- package/lib-es/hw/connectManager.d.ts +2 -1
- package/lib-es/hw/connectManager.d.ts.map +1 -1
- package/lib-es/hw/connectManager.js +4 -4
- package/lib-es/hw/connectManager.js.map +1 -1
- package/lib-es/hw/customLockScreenFetch.d.ts +2 -1
- package/lib-es/hw/customLockScreenFetch.d.ts.map +1 -1
- package/lib-es/hw/customLockScreenFetch.js +2 -2
- package/lib-es/hw/customLockScreenFetch.js.map +1 -1
- package/lib-es/hw/customLockScreenLoad.d.ts +2 -1
- package/lib-es/hw/customLockScreenLoad.d.ts.map +1 -1
- package/lib-es/hw/customLockScreenLoad.js +2 -2
- package/lib-es/hw/customLockScreenLoad.js.map +1 -1
- package/lib-es/hw/deviceAccess.d.ts +3 -3
- package/lib-es/hw/deviceAccess.d.ts.map +1 -1
- package/lib-es/hw/deviceAccess.js +2 -1
- package/lib-es/hw/deviceAccess.js.map +1 -1
- package/lib-es/hw/getGenuineCheckFromDeviceId.d.ts +2 -1
- package/lib-es/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -1
- package/lib-es/hw/getGenuineCheckFromDeviceId.js +2 -2
- package/lib-es/hw/getGenuineCheckFromDeviceId.js.map +1 -1
- package/lib-es/hw/getOnboardingStatePolling.d.ts +2 -1
- package/lib-es/hw/getOnboardingStatePolling.d.ts.map +1 -1
- package/lib-es/hw/getOnboardingStatePolling.js +5 -2
- package/lib-es/hw/getOnboardingStatePolling.js.map +1 -1
- package/lib-es/hw/hooks/useGenuineCheck.d.ts +2 -1
- package/lib-es/hw/hooks/useGenuineCheck.d.ts.map +1 -1
- package/lib-es/hw/hooks/useGenuineCheck.js +3 -1
- package/lib-es/hw/hooks/useGenuineCheck.js.map +1 -1
- package/lib-es/hw/index.d.ts +6 -2
- package/lib-es/hw/index.d.ts.map +1 -1
- package/lib-es/hw/index.js +6 -6
- package/lib-es/hw/index.js.map +1 -1
- package/lib-es/hw/installLanguage.d.ts +2 -1
- package/lib-es/hw/installLanguage.d.ts.map +1 -1
- package/lib-es/hw/installLanguage.js +2 -2
- package/lib-es/hw/installLanguage.js.map +1 -1
- package/lib-es/onboarding/hooks/useOnboardingStatePolling.d.ts.map +1 -1
- package/lib-es/onboarding/hooks/useOnboardingStatePolling.js +1 -0
- package/lib-es/onboarding/hooks/useOnboardingStatePolling.js.map +1 -1
- package/package.json +73 -73
- package/src/deviceSDK/actions/getBatteryStatuses.ts +3 -1
- package/src/deviceSDK/actions/getDeviceInfo.ts +3 -2
- package/src/deviceSDK/actions/getLatestAvailableFirmware.test.ts +31 -0
- package/src/deviceSDK/actions/getLatestAvailableFirmware.ts +7 -2
- package/src/deviceSDK/actions/toggleOnboardingEarlyCheck.ts +3 -1
- package/src/deviceSDK/actions/updateFirmware.ts +5 -2
- package/src/deviceSDK/hooks/useBatteryStatuses.test.ts +1 -1
- package/src/deviceSDK/hooks/useBatteryStatuses.ts +4 -1
- package/src/deviceSDK/hooks/useGetDeviceInfo.ts +4 -2
- package/src/deviceSDK/hooks/useGetLatestAvailableFirmware.ts +3 -0
- package/src/deviceSDK/hooks/useToggleOnboardingEarlyChecks.test.ts +2 -0
- package/src/deviceSDK/hooks/useToggleOnboardingEarlyChecks.ts +4 -1
- package/src/deviceSDK/hooks/useUpdateFirmware.ts +4 -1
- package/src/deviceSDK/tasks/getBatteryStatuses.ts +6 -1
- package/src/deviceSDK/tasks/getDeviceInfo.ts +6 -2
- package/src/deviceSDK/tasks/getLatestFirmware.ts +6 -1
- package/src/deviceSDK/tasks/toggleOnboardingEarlyCheck.test.ts +3 -0
- package/src/deviceSDK/tasks/toggleOnboardingEarlyCheck.ts +6 -1
- package/src/deviceSDK/tasks/updateFirmware.ts +6 -1
- package/src/deviceSDK/transports/core.ts +6 -3
- package/src/exchange/swap/completeExchange.ts +1 -22
- package/src/families/canton/config.ts +3 -0
- package/src/hw/actions/app.ts +2 -1
- package/src/hw/actions/customLockScreenLoad.ts +6 -2
- package/src/hw/actions/implementations.ts +17 -3
- package/src/hw/connectApp.ts +12 -5
- package/src/hw/connectManager.ts +13 -6
- package/src/hw/customLockScreenFetch.ts +10 -2
- package/src/hw/customLockScreenLoad.test.ts +28 -3
- package/src/hw/customLockScreenLoad.ts +10 -2
- package/src/hw/deviceAccess.ts +4 -3
- package/src/hw/getGenuineCheckFromDeviceId.test.ts +4 -0
- package/src/hw/getGenuineCheckFromDeviceId.ts +6 -1
- package/src/hw/getOnboardingStatePolling.test.ts +34 -0
- package/src/hw/getOnboardingStatePolling.ts +6 -3
- package/src/hw/hooks/useGenuineCheck.test.ts +37 -0
- package/src/hw/hooks/useGenuineCheck.ts +4 -0
- package/src/hw/index.test.ts +27 -6
- package/src/hw/index.ts +15 -8
- package/src/hw/installLanguage.ts +6 -1
- package/src/onboarding/hooks/useOnboardingStatePolling.ts +1 -0
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.52.
|
|
4
|
+
"version": "34.52.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@blooo/hw-app-acre": "^1.1.1",
|
|
105
105
|
"@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.2",
|
|
106
|
-
"@ledgerhq/device-management-kit": "0.
|
|
106
|
+
"@ledgerhq/device-management-kit": "0.11.0",
|
|
107
107
|
"@ledgerhq/live-app-sdk": "^0.8.1",
|
|
108
108
|
"@ledgerhq/wallet-api-client": "^1.12.3",
|
|
109
109
|
"@ledgerhq/wallet-api-core": "^1.25.0",
|
|
@@ -164,79 +164,79 @@
|
|
|
164
164
|
"yargs": "^17.0.0",
|
|
165
165
|
"zod": "^3.22.4",
|
|
166
166
|
"react-redux": "^7.2.9",
|
|
167
|
-
"@ledgerhq/coin-algorand": "^0.12.0
|
|
168
|
-
"@ledgerhq/coin-aptos": "^3.5.0
|
|
169
|
-
"@ledgerhq/coin-bitcoin": "^0.24.0
|
|
170
|
-
"@ledgerhq/coin-canton": "^0.9.0
|
|
171
|
-
"@ledgerhq/coin-cardano": "^0.14.0
|
|
172
|
-
"@ledgerhq/coin-casper": "^2.3.0
|
|
173
|
-
"@ledgerhq/coin-celo": "^1.7.0
|
|
174
|
-
"@ledgerhq/coin-cosmos": "^0.19.0
|
|
175
|
-
"@ledgerhq/coin-evm": "^2.34.0
|
|
176
|
-
"@ledgerhq/coin-filecoin": "^1.14.0
|
|
177
|
-
"@ledgerhq/coin-framework": "^6.8.0
|
|
178
|
-
"@ledgerhq/coin-hedera": "^1.13.0
|
|
179
|
-
"@ledgerhq/coin-icon": "^0.14.0
|
|
180
|
-
"@ledgerhq/coin-internet_computer": "^1.10.0
|
|
181
|
-
"@ledgerhq/coin-kaspa": "^1.4.0
|
|
182
|
-
"@ledgerhq/coin-mina": "^1.4.0
|
|
183
|
-
"@ledgerhq/coin-multiversx": "^0.7.0
|
|
184
|
-
"@ledgerhq/coin-near": "^0.15.0
|
|
185
|
-
"@ledgerhq/coin-polkadot": "^6.12.0
|
|
186
|
-
"@ledgerhq/coin-solana": "^0.36.0
|
|
187
|
-
"@ledgerhq/coin-stacks": "^0.11.0
|
|
188
|
-
"@ledgerhq/coin-stellar": "^6.6.0
|
|
189
|
-
"@ledgerhq/coin-sui": "^0.17.0
|
|
190
|
-
"@ledgerhq/coin-tezos": "^6.8.0
|
|
191
|
-
"@ledgerhq/coin-ton": "^0.16.0
|
|
192
|
-
"@ledgerhq/coin-tron": "^5.6.0
|
|
193
|
-
"@ledgerhq/coin-vechain": "^2.12.0
|
|
194
|
-
"@ledgerhq/coin-xrp": "^7.7.0
|
|
195
|
-
"@ledgerhq/crypto-icons-ui": "^1.22.0
|
|
196
|
-
"@ledgerhq/cryptoassets": "^13.32.0
|
|
197
|
-
"@ledgerhq/device-core": "^0.6.7
|
|
198
|
-
"@ledgerhq/devices": "8.7.0
|
|
199
|
-
"@ledgerhq/errors": "^6.27.0
|
|
200
|
-
"@ledgerhq/hw-app-algorand": "^6.31.9
|
|
201
|
-
"@ledgerhq/hw-app-aptos": "^6.34.9
|
|
202
|
-
"@ledgerhq/hw-app-btc": "^10.12.0
|
|
203
|
-
"@ledgerhq/hw-app-celo": "^6.35.2
|
|
204
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.9
|
|
205
|
-
"@ledgerhq/hw-app-eth": "^6.47.0
|
|
206
|
-
"@ledgerhq/hw-app-exchange": "^0.17.0
|
|
207
|
-
"@ledgerhq/hw-app-hedera": "^1.2.9
|
|
208
|
-
"@ledgerhq/hw-app-icon": "^1.3.9
|
|
209
|
-
"@ledgerhq/hw-app-kaspa": "^1.3.2
|
|
210
|
-
"@ledgerhq/hw-app-multiversx": "^6.26.0
|
|
211
|
-
"@ledgerhq/hw-app-near": "^6.31.9
|
|
212
|
-
"@ledgerhq/hw-app-polkadot": "^6.34.9
|
|
213
|
-
"@ledgerhq/hw-app-str": "^7.2.9
|
|
167
|
+
"@ledgerhq/coin-algorand": "^0.12.0",
|
|
168
|
+
"@ledgerhq/coin-aptos": "^3.5.0",
|
|
169
|
+
"@ledgerhq/coin-bitcoin": "^0.24.0",
|
|
170
|
+
"@ledgerhq/coin-canton": "^0.9.0",
|
|
171
|
+
"@ledgerhq/coin-cardano": "^0.14.0",
|
|
172
|
+
"@ledgerhq/coin-casper": "^2.3.0",
|
|
173
|
+
"@ledgerhq/coin-celo": "^1.7.0",
|
|
174
|
+
"@ledgerhq/coin-cosmos": "^0.19.0",
|
|
175
|
+
"@ledgerhq/coin-evm": "^2.34.0",
|
|
176
|
+
"@ledgerhq/coin-filecoin": "^1.14.0",
|
|
177
|
+
"@ledgerhq/coin-framework": "^6.8.0",
|
|
178
|
+
"@ledgerhq/coin-hedera": "^1.13.0",
|
|
179
|
+
"@ledgerhq/coin-icon": "^0.14.0",
|
|
180
|
+
"@ledgerhq/coin-internet_computer": "^1.10.0",
|
|
181
|
+
"@ledgerhq/coin-kaspa": "^1.4.0",
|
|
182
|
+
"@ledgerhq/coin-mina": "^1.4.0",
|
|
183
|
+
"@ledgerhq/coin-multiversx": "^0.7.0",
|
|
184
|
+
"@ledgerhq/coin-near": "^0.15.0",
|
|
185
|
+
"@ledgerhq/coin-polkadot": "^6.12.0",
|
|
186
|
+
"@ledgerhq/coin-solana": "^0.36.0",
|
|
187
|
+
"@ledgerhq/coin-stacks": "^0.11.0",
|
|
188
|
+
"@ledgerhq/coin-stellar": "^6.6.0",
|
|
189
|
+
"@ledgerhq/coin-sui": "^0.17.0",
|
|
190
|
+
"@ledgerhq/coin-tezos": "^6.8.0",
|
|
191
|
+
"@ledgerhq/coin-ton": "^0.16.0",
|
|
192
|
+
"@ledgerhq/coin-tron": "^5.6.0",
|
|
193
|
+
"@ledgerhq/coin-vechain": "^2.12.0",
|
|
194
|
+
"@ledgerhq/coin-xrp": "^7.7.0",
|
|
195
|
+
"@ledgerhq/crypto-icons-ui": "^1.22.0",
|
|
196
|
+
"@ledgerhq/cryptoassets": "^13.32.0",
|
|
197
|
+
"@ledgerhq/device-core": "^0.6.7",
|
|
198
|
+
"@ledgerhq/devices": "8.7.0",
|
|
199
|
+
"@ledgerhq/errors": "^6.27.0",
|
|
200
|
+
"@ledgerhq/hw-app-algorand": "^6.31.9",
|
|
201
|
+
"@ledgerhq/hw-app-aptos": "^6.34.9",
|
|
202
|
+
"@ledgerhq/hw-app-btc": "^10.12.0",
|
|
203
|
+
"@ledgerhq/hw-app-celo": "^6.35.2",
|
|
204
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.9",
|
|
205
|
+
"@ledgerhq/hw-app-eth": "^6.47.0",
|
|
206
|
+
"@ledgerhq/hw-app-exchange": "^0.17.0",
|
|
207
|
+
"@ledgerhq/hw-app-hedera": "^1.2.9",
|
|
208
|
+
"@ledgerhq/hw-app-icon": "^1.3.9",
|
|
209
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.2",
|
|
210
|
+
"@ledgerhq/hw-app-multiversx": "^6.26.0",
|
|
211
|
+
"@ledgerhq/hw-app-near": "^6.31.9",
|
|
212
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.9",
|
|
213
|
+
"@ledgerhq/hw-app-str": "^7.2.9",
|
|
214
214
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
215
|
-
"@ledgerhq/hw-app-tezos": "^6.31.9
|
|
216
|
-
"@ledgerhq/hw-app-trx": "^6.31.9
|
|
217
|
-
"@ledgerhq/hw-app-vet": "^0.
|
|
218
|
-
"@ledgerhq/hw-app-xrp": "^6.32.7
|
|
219
|
-
"@ledgerhq/hw-bolos": "^6.32.9
|
|
220
|
-
"@ledgerhq/hw-transport": "6.31.13
|
|
221
|
-
"@ledgerhq/hw-transport-mocker": "^6.29.13
|
|
222
|
-
"@ledgerhq/ledger-cal-service": "^1.8.0
|
|
223
|
-
"@ledgerhq/ledger-trust-service": "^0.4.1
|
|
215
|
+
"@ledgerhq/hw-app-tezos": "^6.31.9",
|
|
216
|
+
"@ledgerhq/hw-app-trx": "^6.31.9",
|
|
217
|
+
"@ledgerhq/hw-app-vet": "^0.7.0",
|
|
218
|
+
"@ledgerhq/hw-app-xrp": "^6.32.7",
|
|
219
|
+
"@ledgerhq/hw-bolos": "^6.32.9",
|
|
220
|
+
"@ledgerhq/hw-transport": "6.31.13",
|
|
221
|
+
"@ledgerhq/hw-transport-mocker": "^6.29.13",
|
|
222
|
+
"@ledgerhq/ledger-cal-service": "^1.8.0",
|
|
223
|
+
"@ledgerhq/ledger-trust-service": "^0.4.1",
|
|
224
224
|
"@ledgerhq/live-config": "^3.2.0",
|
|
225
|
-
"@ledgerhq/live-countervalues": "^0.
|
|
226
|
-
"@ledgerhq/live-countervalues-react": "^0.7.1
|
|
227
|
-
"@ledgerhq/live-dmk-shared": "^0.15.0
|
|
228
|
-
"@ledgerhq/live-env": "^2.20.0
|
|
225
|
+
"@ledgerhq/live-countervalues": "^0.9.0",
|
|
226
|
+
"@ledgerhq/live-countervalues-react": "^0.7.1",
|
|
227
|
+
"@ledgerhq/live-dmk-shared": "^0.15.0",
|
|
228
|
+
"@ledgerhq/live-env": "^2.20.0",
|
|
229
229
|
"@ledgerhq/live-hooks": "0.2.0",
|
|
230
|
-
"@ledgerhq/live-network": "^2.1.0
|
|
230
|
+
"@ledgerhq/live-network": "^2.1.0",
|
|
231
231
|
"@ledgerhq/live-promise": "^0.1.1",
|
|
232
|
-
"@ledgerhq/live-signer-canton": "^0.5.0
|
|
233
|
-
"@ledgerhq/live-signer-evm": "^0.10.0
|
|
234
|
-
"@ledgerhq/live-signer-solana": "^0.
|
|
235
|
-
"@ledgerhq/live-wallet": "^0.15.0
|
|
232
|
+
"@ledgerhq/live-signer-canton": "^0.5.0",
|
|
233
|
+
"@ledgerhq/live-signer-evm": "^0.10.0",
|
|
234
|
+
"@ledgerhq/live-signer-solana": "^0.6.0",
|
|
235
|
+
"@ledgerhq/live-wallet": "^0.15.0",
|
|
236
236
|
"@ledgerhq/logs": "^6.13.0",
|
|
237
|
-
"@ledgerhq/speculos-transport": "^0.2.14
|
|
238
|
-
"@ledgerhq/wallet-api-acre-module": "^0.
|
|
239
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.
|
|
237
|
+
"@ledgerhq/speculos-transport": "^0.2.14",
|
|
238
|
+
"@ledgerhq/wallet-api-acre-module": "^0.9.0",
|
|
239
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.18.0"
|
|
240
240
|
},
|
|
241
241
|
"devDependencies": {
|
|
242
242
|
"@solana/web3.js": "1.95.4",
|
|
@@ -284,10 +284,10 @@
|
|
|
284
284
|
"undici": "6.19.2",
|
|
285
285
|
"uuid": "^8.3.2",
|
|
286
286
|
"ws": "7",
|
|
287
|
-
"@ledgerhq/device-react": "^0.3.1
|
|
288
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
|
287
|
+
"@ledgerhq/device-react": "^0.3.1",
|
|
288
|
+
"@ledgerhq/types-cryptoassets": "^7.30.0",
|
|
289
289
|
"@ledgerhq/types-devices": "^6.27.0",
|
|
290
|
-
"@ledgerhq/types-live": "^6.88.0
|
|
290
|
+
"@ledgerhq/types-live": "^6.88.0"
|
|
291
291
|
},
|
|
292
292
|
"scripts": {
|
|
293
293
|
"build": "zx ./scripts/build-ts.mjs",
|
|
@@ -8,6 +8,7 @@ import { BatteryStatusTypes } from "../../hw/getBatteryStatus";
|
|
|
8
8
|
|
|
9
9
|
export type GetBatteryStatusesActionArgs = {
|
|
10
10
|
deviceId: DeviceId;
|
|
11
|
+
deviceName: string | null;
|
|
11
12
|
statuses: BatteryStatusTypes[];
|
|
12
13
|
};
|
|
13
14
|
|
|
@@ -26,9 +27,10 @@ export const initialState: GetBatteryStatusesActionState = {
|
|
|
26
27
|
|
|
27
28
|
export function getBatteryStatusesAction({
|
|
28
29
|
deviceId,
|
|
30
|
+
deviceName,
|
|
29
31
|
statuses,
|
|
30
32
|
}: GetBatteryStatusesActionArgs): Observable<GetBatteryStatusesActionState> {
|
|
31
|
-
return getBatteryStatusTask({ deviceId, statuses }).pipe(
|
|
33
|
+
return getBatteryStatusTask({ deviceId, deviceName, statuses }).pipe(
|
|
32
34
|
scan((currentState, event) => {
|
|
33
35
|
switch (event.type) {
|
|
34
36
|
case "taskError":
|
|
@@ -4,7 +4,7 @@ import { scan } from "rxjs/operators";
|
|
|
4
4
|
import { FullActionState, initialSharedActionState, sharedReducer } from "./core";
|
|
5
5
|
import { getDeviceInfoTask, GetDeviceInfoTaskError } from "../tasks/getDeviceInfo";
|
|
6
6
|
|
|
7
|
-
export type GetDeviceInfoActionArgs = { deviceId: DeviceId };
|
|
7
|
+
export type GetDeviceInfoActionArgs = { deviceId: DeviceId; deviceName: string | null };
|
|
8
8
|
|
|
9
9
|
// Union of all the tasks specific errors
|
|
10
10
|
export type GetDeviceInfoActionErrorType = GetDeviceInfoTaskError;
|
|
@@ -21,10 +21,11 @@ export const initialState: GetDeviceInfoActionState = {
|
|
|
21
21
|
|
|
22
22
|
export function getDeviceInfoAction({
|
|
23
23
|
deviceId,
|
|
24
|
+
deviceName,
|
|
24
25
|
}: GetDeviceInfoActionArgs): Observable<GetDeviceInfoActionState> {
|
|
25
26
|
// TODO: to decide: should we push an event if the state is not changing?
|
|
26
27
|
// For ex: when the device is locked with 0x5515: an event with lockedDevice: true is pushed for each retry
|
|
27
|
-
return getDeviceInfoTask({ deviceId }).pipe(
|
|
28
|
+
return getDeviceInfoTask({ deviceId, deviceName }).pipe(
|
|
28
29
|
scan((currentState, event) => {
|
|
29
30
|
switch (event.type) {
|
|
30
31
|
case "taskError":
|
|
@@ -70,6 +70,7 @@ describe("getLatestAvailableFirmwareAction", () => {
|
|
|
70
70
|
|
|
71
71
|
getLatestAvailableFirmwareAction({
|
|
72
72
|
deviceId: "A_DEVICE_ID",
|
|
73
|
+
deviceName: null,
|
|
73
74
|
}).subscribe({
|
|
74
75
|
next: ({
|
|
75
76
|
firmwareUpdateContext,
|
|
@@ -124,6 +125,7 @@ describe("getLatestAvailableFirmwareAction", () => {
|
|
|
124
125
|
|
|
125
126
|
getLatestAvailableFirmwareAction({
|
|
126
127
|
deviceId: "A_DEVICE_ID",
|
|
128
|
+
deviceName: null,
|
|
127
129
|
}).subscribe({
|
|
128
130
|
next: ({
|
|
129
131
|
firmwareUpdateContext,
|
|
@@ -188,6 +190,7 @@ describe("getLatestAvailableFirmwareAction", () => {
|
|
|
188
190
|
let step = 1;
|
|
189
191
|
getLatestAvailableFirmwareAction({
|
|
190
192
|
deviceId: "A_DEVICE_ID",
|
|
193
|
+
deviceName: null,
|
|
191
194
|
}).subscribe({
|
|
192
195
|
next: ({
|
|
193
196
|
firmwareUpdateContext,
|
|
@@ -265,6 +268,7 @@ describe("getLatestAvailableFirmwareAction", () => {
|
|
|
265
268
|
let step = 1;
|
|
266
269
|
getLatestAvailableFirmwareAction({
|
|
267
270
|
deviceId: "A_DEVICE_ID",
|
|
271
|
+
deviceName: null,
|
|
268
272
|
}).subscribe({
|
|
269
273
|
next: ({
|
|
270
274
|
firmwareUpdateContext,
|
|
@@ -322,4 +326,31 @@ describe("getLatestAvailableFirmwareAction", () => {
|
|
|
322
326
|
});
|
|
323
327
|
});
|
|
324
328
|
});
|
|
329
|
+
|
|
330
|
+
describe("When deviceName is provided", () => {
|
|
331
|
+
it("should pass deviceName to the underlying tasks", done => {
|
|
332
|
+
mockedInternalGetDeviceInfoTask.mockReturnValue(
|
|
333
|
+
of({ type: "data", deviceInfo: aDeviceInfo }),
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
mockedGetLatestFirmwareTask.mockReturnValue(
|
|
337
|
+
of({ type: "data", firmwareUpdateContext: aLatestFirmwareContext }),
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
getLatestAvailableFirmwareAction({
|
|
341
|
+
deviceId: "A_DEVICE_ID",
|
|
342
|
+
deviceName: "My Device",
|
|
343
|
+
}).subscribe({
|
|
344
|
+
complete: () => {
|
|
345
|
+
expect(mockedInternalGetDeviceInfoTask).toHaveBeenCalledWith(
|
|
346
|
+
expect.objectContaining({ deviceName: "My Device" }),
|
|
347
|
+
);
|
|
348
|
+
expect(mockedGetLatestFirmwareTask).toHaveBeenCalledWith(
|
|
349
|
+
expect.objectContaining({ deviceName: "My Device" }),
|
|
350
|
+
);
|
|
351
|
+
done();
|
|
352
|
+
},
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
});
|
|
325
356
|
});
|
|
@@ -17,6 +17,7 @@ import { SharedTaskEvent } from "../tasks/core";
|
|
|
17
17
|
|
|
18
18
|
export type GetLatestAvailableFirmwareActionArgs = {
|
|
19
19
|
deviceId: DeviceId;
|
|
20
|
+
deviceName: string | null;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
// Union of all the tasks specific errors
|
|
@@ -65,6 +66,7 @@ export const initialState: GetLatestAvailableFirmwareActionState = {
|
|
|
65
66
|
*/
|
|
66
67
|
export function getLatestAvailableFirmwareAction({
|
|
67
68
|
deviceId,
|
|
69
|
+
deviceName,
|
|
68
70
|
}: GetLatestAvailableFirmwareActionArgs): Observable<GetLatestAvailableFirmwareActionState> {
|
|
69
71
|
const observable = new Observable<
|
|
70
72
|
| (GetLatestFirmwareTaskEvent & {
|
|
@@ -81,7 +83,7 @@ export function getLatestAvailableFirmwareAction({
|
|
|
81
83
|
status: "ongoing",
|
|
82
84
|
});
|
|
83
85
|
|
|
84
|
-
getDeviceInfoTask({ deviceId })
|
|
86
|
+
getDeviceInfoTask({ deviceId, deviceName })
|
|
85
87
|
.pipe(
|
|
86
88
|
switchMap(event => {
|
|
87
89
|
if (event.type !== "data") {
|
|
@@ -99,7 +101,10 @@ export function getLatestAvailableFirmwareAction({
|
|
|
99
101
|
});
|
|
100
102
|
|
|
101
103
|
// Keeps `deviceInfo` in the next event
|
|
102
|
-
return forkJoin([
|
|
104
|
+
return forkJoin([
|
|
105
|
+
getLatestFirmwareTask({ deviceId, deviceName, deviceInfo }),
|
|
106
|
+
of(deviceInfo),
|
|
107
|
+
]).pipe(
|
|
103
108
|
// Creating a new "event"-like object, extending it with `deviceInfo`
|
|
104
109
|
switchMap(([event, deviceInfo]) => {
|
|
105
110
|
return of({
|
|
@@ -10,6 +10,7 @@ import { scan } from "rxjs/operators";
|
|
|
10
10
|
|
|
11
11
|
export type ToggleOnboardingEarlyCheckActionArgs = {
|
|
12
12
|
deviceId: DeviceId;
|
|
13
|
+
deviceName: string | null;
|
|
13
14
|
toggleType: "enter" | "exit";
|
|
14
15
|
};
|
|
15
16
|
|
|
@@ -44,9 +45,10 @@ export const initialState: ToggleOnboardingEarlyCheckActionState = {
|
|
|
44
45
|
*/
|
|
45
46
|
export function toggleOnboardingEarlyCheckAction({
|
|
46
47
|
deviceId,
|
|
48
|
+
deviceName,
|
|
47
49
|
toggleType,
|
|
48
50
|
}: ToggleOnboardingEarlyCheckActionArgs): Observable<ToggleOnboardingEarlyCheckActionState> {
|
|
49
|
-
return toggleOnboardingEarlyCheckTask({ deviceId, toggleType }).pipe(
|
|
51
|
+
return toggleOnboardingEarlyCheckTask({ deviceId, deviceName, toggleType }).pipe(
|
|
50
52
|
scan<ToggleOnboardingEarlyCheckTaskEvent, ToggleOnboardingEarlyCheckActionState>(
|
|
51
53
|
(currentState, event) => {
|
|
52
54
|
switch (event.type) {
|
|
@@ -8,6 +8,7 @@ import { getLatestFirmwareTask, GetLatestFirmwareTaskErrorEvent } from "../tasks
|
|
|
8
8
|
|
|
9
9
|
export type updateFirmwareActionArgs = {
|
|
10
10
|
deviceId: DeviceId;
|
|
11
|
+
deviceName: string | null;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export type UpdateFirmwareActionState = FullActionState<{
|
|
@@ -51,16 +52,17 @@ export const initialState: UpdateFirmwareActionState = {
|
|
|
51
52
|
*/
|
|
52
53
|
export function updateFirmwareAction({
|
|
53
54
|
deviceId,
|
|
55
|
+
deviceName,
|
|
54
56
|
}: updateFirmwareActionArgs): Observable<UpdateFirmwareActionState> {
|
|
55
57
|
return concat(
|
|
56
58
|
of(initialState),
|
|
57
|
-
getDeviceInfoTask({ deviceId }).pipe(
|
|
59
|
+
getDeviceInfoTask({ deviceId, deviceName }).pipe(
|
|
58
60
|
switchMap(event => {
|
|
59
61
|
if (event.type !== "data") {
|
|
60
62
|
return of(event);
|
|
61
63
|
}
|
|
62
64
|
const { deviceInfo } = event;
|
|
63
|
-
return getLatestFirmwareTask({ deviceId, deviceInfo });
|
|
65
|
+
return getLatestFirmwareTask({ deviceId, deviceName, deviceInfo });
|
|
64
66
|
}),
|
|
65
67
|
switchMap(event => {
|
|
66
68
|
if (event.type !== "data") {
|
|
@@ -68,6 +70,7 @@ export function updateFirmwareAction({
|
|
|
68
70
|
} else {
|
|
69
71
|
return updateFirmwareTask({
|
|
70
72
|
deviceId,
|
|
73
|
+
deviceName,
|
|
71
74
|
updateContext: event.firmwareUpdateContext,
|
|
72
75
|
});
|
|
73
76
|
}
|
|
@@ -6,7 +6,7 @@ import { useBatteryStatuses } from "./useBatteryStatuses";
|
|
|
6
6
|
|
|
7
7
|
describe("useBatteryStatuses", () => {
|
|
8
8
|
it("should return an initial cancelRequest method that is callable", async () => {
|
|
9
|
-
const { result } = renderHook(() => useBatteryStatuses({ statuses: [] }));
|
|
9
|
+
const { result } = renderHook(() => useBatteryStatuses({ deviceName: null, statuses: [] }));
|
|
10
10
|
expect(() => result.current.cancelRequest()).not.toThrow();
|
|
11
11
|
});
|
|
12
12
|
});
|
|
@@ -11,6 +11,7 @@ import { useEnv } from "../../env.react";
|
|
|
11
11
|
|
|
12
12
|
export type UseBatteryStatusesArgs = {
|
|
13
13
|
deviceId?: string;
|
|
14
|
+
deviceName: string | null;
|
|
14
15
|
statuses: BatteryStatusTypes[];
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -28,6 +29,7 @@ export type UseBatteryStatusesArgs = {
|
|
|
28
29
|
*/
|
|
29
30
|
export const useBatteryStatuses = ({
|
|
30
31
|
deviceId,
|
|
32
|
+
deviceName,
|
|
31
33
|
statuses,
|
|
32
34
|
}: UseBatteryStatusesArgs): {
|
|
33
35
|
batteryStatusesState: GetBatteryStatusesActionState;
|
|
@@ -53,6 +55,7 @@ export const useBatteryStatuses = ({
|
|
|
53
55
|
if (nonce > 0 && deviceId) {
|
|
54
56
|
const sub = getBatteryStatusesAction({
|
|
55
57
|
deviceId,
|
|
58
|
+
deviceName,
|
|
56
59
|
statuses,
|
|
57
60
|
}).subscribe({
|
|
58
61
|
next: state => {
|
|
@@ -87,7 +90,7 @@ export const useBatteryStatuses = ({
|
|
|
87
90
|
sub.unsubscribe();
|
|
88
91
|
};
|
|
89
92
|
}
|
|
90
|
-
}, [deviceId, lowBatteryPercentage, statuses, nonce]);
|
|
93
|
+
}, [deviceId, deviceName, lowBatteryPercentage, statuses, nonce]);
|
|
91
94
|
|
|
92
95
|
const triggerRequest = useCallback(() => {
|
|
93
96
|
setRequestCompleted(false);
|
|
@@ -8,19 +8,21 @@ import {
|
|
|
8
8
|
export type UseGetDeviceInfoArgs = {
|
|
9
9
|
getDeviceInfoAction?: typeof defaultGetDeviceInfoAction;
|
|
10
10
|
deviceId: string;
|
|
11
|
+
deviceName: string | null;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const useGetDeviceInfo = ({
|
|
14
15
|
getDeviceInfoAction = defaultGetDeviceInfoAction,
|
|
15
16
|
deviceId,
|
|
17
|
+
deviceName,
|
|
16
18
|
}: UseGetDeviceInfoArgs): GetDeviceInfoActionState => {
|
|
17
19
|
const [state, setState] = useState<GetDeviceInfoActionState>(initialState);
|
|
18
20
|
|
|
19
21
|
useEffect(() => {
|
|
20
|
-
const sub = getDeviceInfoAction({ deviceId }).subscribe(setState);
|
|
22
|
+
const sub = getDeviceInfoAction({ deviceId, deviceName }).subscribe(setState);
|
|
21
23
|
|
|
22
24
|
return () => sub.unsubscribe();
|
|
23
|
-
}, [deviceId, getDeviceInfoAction]);
|
|
25
|
+
}, [deviceId, getDeviceInfoAction, deviceName]);
|
|
24
26
|
|
|
25
27
|
return state;
|
|
26
28
|
};
|
|
@@ -11,6 +11,7 @@ import type { IgnoredOSUpdates } from "@ledgerhq/types-live";
|
|
|
11
11
|
export type UseGetLatestAvailableFirmwareArgs = {
|
|
12
12
|
getLatestAvailableFirmwareAction?: typeof defaultGetLatestAvailableFirmwareAction;
|
|
13
13
|
deviceId: string;
|
|
14
|
+
deviceName: string | null;
|
|
14
15
|
isHookEnabled?: boolean;
|
|
15
16
|
ignoredOSUpdates?: IgnoredOSUpdates;
|
|
16
17
|
};
|
|
@@ -32,6 +33,7 @@ export type UseGetLatestAvailableFirmwareArgs = {
|
|
|
32
33
|
export const useGetLatestAvailableFirmware = ({
|
|
33
34
|
getLatestAvailableFirmwareAction = defaultGetLatestAvailableFirmwareAction,
|
|
34
35
|
deviceId,
|
|
36
|
+
deviceName,
|
|
35
37
|
isHookEnabled = true,
|
|
36
38
|
ignoredOSUpdates,
|
|
37
39
|
}: UseGetLatestAvailableFirmwareArgs): {
|
|
@@ -50,6 +52,7 @@ export const useGetLatestAvailableFirmware = ({
|
|
|
50
52
|
|
|
51
53
|
const subscription = getLatestAvailableFirmwareAction({
|
|
52
54
|
deviceId,
|
|
55
|
+
deviceName,
|
|
53
56
|
}).subscribe({
|
|
54
57
|
next: newValue => {
|
|
55
58
|
const filteredValue = filterIgnoredFirmwareUpdates(newValue, ignoredOSUpdates);
|
|
@@ -24,6 +24,7 @@ describe("useToggleOnboardingEarlyCheck", () => {
|
|
|
24
24
|
useToggleOnboardingEarlyCheck({
|
|
25
25
|
toggleOnboardingEarlyCheckAction: mockedToggleOnboardingEarlyCheckAction,
|
|
26
26
|
deviceId: "",
|
|
27
|
+
deviceName: null,
|
|
27
28
|
toggleType: "enter",
|
|
28
29
|
}),
|
|
29
30
|
);
|
|
@@ -50,6 +51,7 @@ describe("useToggleOnboardingEarlyCheck", () => {
|
|
|
50
51
|
useToggleOnboardingEarlyCheck({
|
|
51
52
|
toggleOnboardingEarlyCheckAction: mockedToggleOnboardingEarlyCheckAction,
|
|
52
53
|
deviceId: "",
|
|
54
|
+
deviceName: null,
|
|
53
55
|
toggleType,
|
|
54
56
|
}),
|
|
55
57
|
);
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
export type UseToggleOnboardingEarlyCheckArgs = {
|
|
11
11
|
toggleOnboardingEarlyCheckAction?: typeof defaultToggleOnboardingEarlyCheckAction;
|
|
12
12
|
deviceId: string;
|
|
13
|
+
deviceName: string | null;
|
|
13
14
|
toggleType: ToggleOnboardingEarlyCheckActionArgs["toggleType"] | null;
|
|
14
15
|
};
|
|
15
16
|
|
|
@@ -39,6 +40,7 @@ export type UseToggleOnboardingEarlyCheckArgs = {
|
|
|
39
40
|
export const useToggleOnboardingEarlyCheck = ({
|
|
40
41
|
toggleOnboardingEarlyCheckAction = defaultToggleOnboardingEarlyCheckAction,
|
|
41
42
|
deviceId,
|
|
43
|
+
deviceName,
|
|
42
44
|
toggleType,
|
|
43
45
|
}: UseToggleOnboardingEarlyCheckArgs): {
|
|
44
46
|
state: ToggleOnboardingEarlyCheckActionState;
|
|
@@ -50,6 +52,7 @@ export const useToggleOnboardingEarlyCheck = ({
|
|
|
50
52
|
|
|
51
53
|
const subscription = toggleOnboardingEarlyCheckAction({
|
|
52
54
|
deviceId,
|
|
55
|
+
deviceName,
|
|
53
56
|
toggleType,
|
|
54
57
|
}).subscribe({
|
|
55
58
|
next: setState,
|
|
@@ -64,7 +67,7 @@ export const useToggleOnboardingEarlyCheck = ({
|
|
|
64
67
|
|
|
65
68
|
subscription.unsubscribe();
|
|
66
69
|
};
|
|
67
|
-
}, [deviceId, toggleOnboardingEarlyCheckAction, toggleType]);
|
|
70
|
+
}, [deviceId, deviceName, toggleOnboardingEarlyCheckAction, toggleType]);
|
|
68
71
|
|
|
69
72
|
return { state };
|
|
70
73
|
};
|
|
@@ -10,6 +10,7 @@ const STATE_UPDATE_THROTTLE = 500;
|
|
|
10
10
|
|
|
11
11
|
export type UseUpdateFirmwareArgs = {
|
|
12
12
|
deviceId: string;
|
|
13
|
+
deviceName: string | null;
|
|
13
14
|
updateFirmwareAction?: typeof defaultUpdateFirmwareAction;
|
|
14
15
|
};
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ export type UseUpdateFirmwareArgs = {
|
|
|
22
23
|
*/
|
|
23
24
|
export function useUpdateFirmware({
|
|
24
25
|
deviceId,
|
|
26
|
+
deviceName,
|
|
25
27
|
updateFirmwareAction = defaultUpdateFirmwareAction,
|
|
26
28
|
}: UseUpdateFirmwareArgs): {
|
|
27
29
|
updateState: UpdateFirmwareActionState;
|
|
@@ -34,6 +36,7 @@ export function useUpdateFirmware({
|
|
|
34
36
|
if (nonce > 0) {
|
|
35
37
|
const sub = updateFirmwareAction({
|
|
36
38
|
deviceId,
|
|
39
|
+
deviceName,
|
|
37
40
|
})
|
|
38
41
|
.pipe(
|
|
39
42
|
// in order to correctly throttle the events without losing any important events
|
|
@@ -52,7 +55,7 @@ export function useUpdateFirmware({
|
|
|
52
55
|
sub.unsubscribe();
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
|
-
}, [deviceId, updateFirmwareAction, nonce]);
|
|
58
|
+
}, [deviceId, updateFirmwareAction, nonce, deviceName]);
|
|
56
59
|
|
|
57
60
|
const triggerUpdate = useCallback(() => {
|
|
58
61
|
setUpdateState(initialState);
|
|
@@ -12,6 +12,7 @@ import getBatteryStatus from "../commands/getBatteryStatus";
|
|
|
12
12
|
|
|
13
13
|
export type GetBatteryStatusesTaskArgs = {
|
|
14
14
|
deviceId: DeviceId;
|
|
15
|
+
deviceName: string | null;
|
|
15
16
|
statuses: BatteryStatusTypes[];
|
|
16
17
|
};
|
|
17
18
|
|
|
@@ -30,10 +31,14 @@ export type GetBatteryStatusesTaskEvent =
|
|
|
30
31
|
|
|
31
32
|
function internalGetBatteryStatusesTask({
|
|
32
33
|
deviceId,
|
|
34
|
+
deviceName,
|
|
33
35
|
statuses,
|
|
34
36
|
}: GetBatteryStatusesTaskArgs): Observable<GetBatteryStatusesTaskEvent> {
|
|
35
37
|
return new Observable(subscriber => {
|
|
36
|
-
return withTransport(
|
|
38
|
+
return withTransport(
|
|
39
|
+
deviceId,
|
|
40
|
+
deviceName ? { matchDeviceByName: deviceName } : undefined,
|
|
41
|
+
)(({ transportRef }) =>
|
|
37
42
|
quitApp(transportRef.current).pipe(
|
|
38
43
|
switchMap(() => {
|
|
39
44
|
const statusesObservable = statuses.map(statusType =>
|
|
@@ -15,7 +15,7 @@ import { withTransport } from "../transports/core";
|
|
|
15
15
|
const ManagerAllowedFlag = 0x08;
|
|
16
16
|
const PinValidatedFlag = 0x80;
|
|
17
17
|
|
|
18
|
-
export type GetDeviceInfoTaskArgs = { deviceId: DeviceId };
|
|
18
|
+
export type GetDeviceInfoTaskArgs = { deviceId: DeviceId; deviceName: string | null };
|
|
19
19
|
|
|
20
20
|
// No taskError for getDeviceInfoTask. Kept for consistency with other tasks.
|
|
21
21
|
export type GetDeviceInfoTaskError = "None";
|
|
@@ -33,10 +33,14 @@ export type GetDeviceInfoTaskEvent =
|
|
|
33
33
|
// Exported for tests
|
|
34
34
|
export function internalGetDeviceInfoTask({
|
|
35
35
|
deviceId,
|
|
36
|
+
deviceName,
|
|
36
37
|
}: GetDeviceInfoTaskArgs): Observable<GetDeviceInfoTaskEvent> {
|
|
37
38
|
return new Observable(subscriber => {
|
|
38
39
|
return (
|
|
39
|
-
withTransport(
|
|
40
|
+
withTransport(
|
|
41
|
+
deviceId,
|
|
42
|
+
deviceName ? { matchDeviceByName: deviceName } : undefined,
|
|
43
|
+
)(({ transportRef }) =>
|
|
40
44
|
quitApp(transportRef.current).pipe(
|
|
41
45
|
switchMap(() => {
|
|
42
46
|
return retryOnErrorsCommandWrapper({
|
|
@@ -10,6 +10,7 @@ import { getLatestFirmwareForDeviceUseCase } from "../../device/use-cases/getLat
|
|
|
10
10
|
|
|
11
11
|
export type GetLatestFirmwareTaskArgs = {
|
|
12
12
|
deviceId: DeviceId;
|
|
13
|
+
deviceName: string | null;
|
|
13
14
|
deviceInfo: DeviceInfo;
|
|
14
15
|
};
|
|
15
16
|
|
|
@@ -27,10 +28,14 @@ export type GetLatestFirmwareTaskEvent =
|
|
|
27
28
|
|
|
28
29
|
function internalGetLatestFirmwareTask({
|
|
29
30
|
deviceId,
|
|
31
|
+
deviceName,
|
|
30
32
|
deviceInfo,
|
|
31
33
|
}: GetLatestFirmwareTaskArgs): Observable<GetLatestFirmwareTaskEvent> {
|
|
32
34
|
return new Observable(subscriber => {
|
|
33
|
-
return withDevice(
|
|
35
|
+
return withDevice(
|
|
36
|
+
deviceId,
|
|
37
|
+
deviceName ? { matchDeviceByName: deviceName } : undefined,
|
|
38
|
+
)(transport =>
|
|
34
39
|
quitApp(transport).pipe(
|
|
35
40
|
switchMap(() => {
|
|
36
41
|
return from(getLatestFirmwareForDeviceUseCase(deviceInfo));
|
|
@@ -26,6 +26,7 @@ describe("@deviceSDK/tasks/toggleOnboardingEarlyCheckTask", () => {
|
|
|
26
26
|
// `enter` and `exit` have the same behavior
|
|
27
27
|
toggleOnboardingEarlyCheckTask({
|
|
28
28
|
deviceId: "",
|
|
29
|
+
deviceName: null,
|
|
29
30
|
toggleType: "exit",
|
|
30
31
|
}).subscribe({
|
|
31
32
|
next: event => {
|
|
@@ -47,6 +48,7 @@ describe("@deviceSDK/tasks/toggleOnboardingEarlyCheckTask", () => {
|
|
|
47
48
|
|
|
48
49
|
toggleOnboardingEarlyCheckTask({
|
|
49
50
|
deviceId: "",
|
|
51
|
+
deviceName: null,
|
|
50
52
|
toggleType: "enter",
|
|
51
53
|
}).subscribe({
|
|
52
54
|
next: event => {
|
|
@@ -78,6 +80,7 @@ describe("@deviceSDK/tasks/toggleOnboardingEarlyCheckTask", () => {
|
|
|
78
80
|
|
|
79
81
|
toggleOnboardingEarlyCheckTask({
|
|
80
82
|
deviceId: "",
|
|
83
|
+
deviceName: null,
|
|
81
84
|
toggleType: "enter",
|
|
82
85
|
}).subscribe({
|
|
83
86
|
next: event => {
|