@ledgerhq/live-common 34.53.0-nightly.20251115023630 → 34.53.0-nightly.20251118023800
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/currencies/helpers.d.ts +1 -3
- package/lib/currencies/helpers.d.ts.map +1 -1
- package/lib/currencies/helpers.js +1 -27
- package/lib/currencies/helpers.js.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts +1 -0
- package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.js +1 -0
- package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
- 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/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/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +2 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js +1 -2
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +0 -5
- package/lib/modularDrawer/utils/type.d.ts.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/platform/filters.d.ts +1 -2
- package/lib/platform/filters.d.ts.map +1 -1
- package/lib/platform/filters.js +1 -17
- package/lib/platform/filters.js.map +1 -1
- package/lib/platform/helpers.d.ts +1 -5
- package/lib/platform/helpers.d.ts.map +1 -1
- package/lib/platform/helpers.js +1 -33
- package/lib/platform/helpers.js.map +1 -1
- package/lib/platform/react.d.ts +2 -3
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +66 -16
- package/lib/platform/react.js.map +1 -1
- package/lib/platform/types.d.ts +3 -3
- package/lib/platform/types.d.ts.map +1 -1
- package/lib/utils/getAccountTuplesForCurrency.d.ts +1 -1
- package/lib/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
- package/lib/utils/getAccountTuplesForCurrency.js +2 -3
- package/lib/utils/getAccountTuplesForCurrency.js.map +1 -1
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +5 -4
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/converters.d.ts +1 -0
- package/lib/wallet-api/converters.d.ts.map +1 -1
- package/lib/wallet-api/converters.js +7 -2
- package/lib/wallet-api/converters.js.map +1 -1
- package/lib/wallet-api/react.d.ts +6 -11
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +291 -135
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/tracking.d.ts +6 -0
- package/lib/wallet-api/tracking.d.ts.map +1 -1
- package/lib/wallet-api/tracking.js +20 -0
- package/lib/wallet-api/tracking.js.map +1 -1
- package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.js +65 -80
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/currencies/helpers.d.ts +1 -3
- package/lib-es/currencies/helpers.d.ts.map +1 -1
- package/lib-es/currencies/helpers.js +0 -24
- package/lib-es/currencies/helpers.js.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts +1 -0
- package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.js +1 -0
- package/lib-es/dada-client/hooks/useAssetsData.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/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/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +2 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +1 -2
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +0 -5
- package/lib-es/modularDrawer/utils/type.d.ts.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/lib-es/platform/filters.d.ts +1 -2
- package/lib-es/platform/filters.d.ts.map +1 -1
- package/lib-es/platform/filters.js +0 -15
- package/lib-es/platform/filters.js.map +1 -1
- package/lib-es/platform/helpers.d.ts +1 -5
- package/lib-es/platform/helpers.d.ts.map +1 -1
- package/lib-es/platform/helpers.js +1 -30
- package/lib-es/platform/helpers.js.map +1 -1
- package/lib-es/platform/react.d.ts +2 -3
- package/lib-es/platform/react.d.ts.map +1 -1
- package/lib-es/platform/react.js +67 -16
- package/lib-es/platform/react.js.map +1 -1
- package/lib-es/platform/types.d.ts +3 -3
- package/lib-es/platform/types.d.ts.map +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.d.ts +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.js +2 -3
- package/lib-es/utils/getAccountTuplesForCurrency.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +5 -4
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/converters.d.ts +1 -0
- package/lib-es/wallet-api/converters.d.ts.map +1 -1
- package/lib-es/wallet-api/converters.js +5 -1
- package/lib-es/wallet-api/converters.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts +6 -11
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +289 -131
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/tracking.d.ts +6 -0
- package/lib-es/wallet-api/tracking.d.ts.map +1 -1
- package/lib-es/wallet-api/tracking.js +20 -0
- package/lib-es/wallet-api/tracking.js.map +1 -1
- package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +62 -77
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/package.json +55 -55
- package/src/currencies/helpers.ts +1 -42
- package/src/dada-client/hooks/useAssetsData.ts +1 -0
- 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 +3 -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/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/modularDrawer/hooks/__test__/useAssetAccountCounts.test.ts +0 -5
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +2 -0
- package/src/modularDrawer/hooks/useNetworkAccountCounts.tsx +1 -6
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +1 -2
- package/src/modularDrawer/utils/type.ts +0 -5
- package/src/onboarding/hooks/useOnboardingStatePolling.ts +1 -0
- package/src/platform/filters.ts +1 -23
- package/src/platform/helpers.ts +2 -49
- package/src/platform/react.ts +86 -22
- package/src/platform/types.ts +1 -1
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +0 -30
- package/src/utils/getAccountTuplesForCurrency.ts +1 -6
- package/src/wallet-api/Exchange/server.test.ts +0 -5
- package/src/wallet-api/Exchange/server.ts +7 -6
- package/src/wallet-api/converters.ts +6 -1
- package/src/wallet-api/react.ts +310 -137
- package/src/wallet-api/tracking.ts +22 -0
- package/src/wallet-api/useDappLogic.ts +91 -106
- package/src/currencies/helpers.test.ts +0 -20
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.53.0-nightly.
|
|
4
|
+
"version": "34.53.0-nightly.20251118023800",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.2",
|
|
110
110
|
"@ledgerhq/device-management-kit": "0.11.1",
|
|
111
111
|
"@ledgerhq/live-app-sdk": "^0.8.1",
|
|
112
|
-
"@ledgerhq/wallet-api-client": "^1.12.
|
|
113
|
-
"@ledgerhq/wallet-api-core": "^1.
|
|
114
|
-
"@ledgerhq/wallet-api-server": "^
|
|
112
|
+
"@ledgerhq/wallet-api-client": "^1.12.5",
|
|
113
|
+
"@ledgerhq/wallet-api-core": "^1.26.1",
|
|
114
|
+
"@ledgerhq/wallet-api-server": "^2.0.0",
|
|
115
115
|
"@noble/curves": "^1.9.7",
|
|
116
116
|
"@noble/hashes": "1.8.0",
|
|
117
117
|
"@reduxjs/toolkit": "2.8.2",
|
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
"performance-now": "^2.1.0",
|
|
156
156
|
"prando": "^6.0.1",
|
|
157
157
|
"qs": "^6.10.1",
|
|
158
|
+
"react-redux": "7.2.9",
|
|
158
159
|
"reselect": "^4.1.5",
|
|
159
160
|
"rlp": "^3.0.0",
|
|
160
161
|
"rxjs": "^7.8.1",
|
|
@@ -167,80 +168,79 @@
|
|
|
167
168
|
"xstate": "^5.19.2",
|
|
168
169
|
"yargs": "^17.0.0",
|
|
169
170
|
"zod": "^3.22.4",
|
|
170
|
-
"
|
|
171
|
-
"@ledgerhq/coin-
|
|
172
|
-
"@ledgerhq/coin-
|
|
173
|
-
"@ledgerhq/coin-
|
|
174
|
-
"@ledgerhq/coin-canton": "^0.10.0-nightly.
|
|
175
|
-
"@ledgerhq/coin-
|
|
176
|
-
"@ledgerhq/coin-
|
|
177
|
-
"@ledgerhq/coin-
|
|
178
|
-
"@ledgerhq/coin-
|
|
179
|
-
"@ledgerhq/coin-filecoin": "^1.15.0-nightly.
|
|
180
|
-
"@ledgerhq/coin-
|
|
181
|
-
"@ledgerhq/coin-
|
|
182
|
-
"@ledgerhq/coin-
|
|
183
|
-
"@ledgerhq/coin-
|
|
184
|
-
"@ledgerhq/coin-kaspa": "^1.4.1-nightly.
|
|
185
|
-
"@ledgerhq/coin-mina": "^1.4.1-nightly.
|
|
186
|
-
"@ledgerhq/coin-multiversx": "^0.8.0-nightly.
|
|
187
|
-
"@ledgerhq/coin-
|
|
188
|
-
"@ledgerhq/coin-
|
|
189
|
-
"@ledgerhq/coin-
|
|
190
|
-
"@ledgerhq/coin-
|
|
191
|
-
"@ledgerhq/coin-
|
|
192
|
-
"@ledgerhq/coin-
|
|
193
|
-
"@ledgerhq/coin-
|
|
194
|
-
"@ledgerhq/coin-
|
|
195
|
-
"@ledgerhq/coin-
|
|
196
|
-
"@ledgerhq/coin-tron": "^5.7.0-nightly.
|
|
197
|
-
"@ledgerhq/
|
|
198
|
-
"@ledgerhq/coin-xrp": "^7.8.0-nightly.
|
|
199
|
-
"@ledgerhq/cryptoassets": "^13.33.0-nightly.
|
|
200
|
-
"@ledgerhq/device-core": "^0.6.8-nightly.
|
|
171
|
+
"@ledgerhq/coin-algorand": "^0.13.0-nightly.20251118023800",
|
|
172
|
+
"@ledgerhq/coin-aptos": "^3.6.0-nightly.20251118023800",
|
|
173
|
+
"@ledgerhq/coin-bitcoin": "^0.25.0-nightly.20251118023800",
|
|
174
|
+
"@ledgerhq/coin-cardano": "^0.15.0-nightly.20251118023800",
|
|
175
|
+
"@ledgerhq/coin-canton": "^0.10.0-nightly.20251118023800",
|
|
176
|
+
"@ledgerhq/coin-casper": "^2.3.1-nightly.20251118023800",
|
|
177
|
+
"@ledgerhq/coin-celo": "^1.7.1-nightly.20251118023800",
|
|
178
|
+
"@ledgerhq/coin-cosmos": "^0.20.0-nightly.20251118023800",
|
|
179
|
+
"@ledgerhq/coin-evm": "^2.35.0-nightly.20251118023800",
|
|
180
|
+
"@ledgerhq/coin-filecoin": "^1.15.0-nightly.20251118023800",
|
|
181
|
+
"@ledgerhq/coin-framework": "^6.9.0-nightly.20251118023800",
|
|
182
|
+
"@ledgerhq/coin-hedera": "^1.14.0-nightly.20251118023800",
|
|
183
|
+
"@ledgerhq/coin-icon": "^0.15.0-nightly.20251118023800",
|
|
184
|
+
"@ledgerhq/coin-internet_computer": "^1.10.1-nightly.20251118023800",
|
|
185
|
+
"@ledgerhq/coin-kaspa": "^1.4.1-nightly.20251118023800",
|
|
186
|
+
"@ledgerhq/coin-mina": "^1.4.1-nightly.20251118023800",
|
|
187
|
+
"@ledgerhq/coin-multiversx": "^0.8.0-nightly.20251118023800",
|
|
188
|
+
"@ledgerhq/coin-near": "^0.16.0-nightly.20251118023800",
|
|
189
|
+
"@ledgerhq/coin-polkadot": "^6.13.0-nightly.20251118023800",
|
|
190
|
+
"@ledgerhq/coin-solana": "^0.37.0-nightly.20251118023800",
|
|
191
|
+
"@ledgerhq/coin-stacks": "^0.12.0-nightly.20251118023800",
|
|
192
|
+
"@ledgerhq/coin-stellar": "^6.7.0-nightly.20251118023800",
|
|
193
|
+
"@ledgerhq/coin-sui": "^0.18.0-nightly.20251118023800",
|
|
194
|
+
"@ledgerhq/coin-tezos": "^6.9.0-nightly.20251118023800",
|
|
195
|
+
"@ledgerhq/coin-ton": "^0.17.0-nightly.20251118023800",
|
|
196
|
+
"@ledgerhq/coin-vechain": "^2.12.1-nightly.20251118023800",
|
|
197
|
+
"@ledgerhq/coin-tron": "^5.7.0-nightly.20251118023800",
|
|
198
|
+
"@ledgerhq/crypto-icons-ui": "^1.23.0-nightly.20251118023800",
|
|
199
|
+
"@ledgerhq/coin-xrp": "^7.8.0-nightly.20251118023800",
|
|
200
|
+
"@ledgerhq/cryptoassets": "^13.33.0-nightly.20251118023800",
|
|
201
|
+
"@ledgerhq/device-core": "^0.6.8-nightly.20251118023800",
|
|
201
202
|
"@ledgerhq/devices": "8.7.0",
|
|
202
|
-
"@ledgerhq/crypto-icons-ui": "^1.23.0-nightly.20251115023630",
|
|
203
203
|
"@ledgerhq/errors": "^6.27.0",
|
|
204
204
|
"@ledgerhq/hw-app-algorand": "^6.31.9",
|
|
205
205
|
"@ledgerhq/hw-app-aptos": "^6.34.9",
|
|
206
206
|
"@ledgerhq/hw-app-btc": "^10.12.0",
|
|
207
|
-
"@ledgerhq/hw-app-celo": "^6.35.3-nightly.
|
|
207
|
+
"@ledgerhq/hw-app-celo": "^6.35.3-nightly.20251118023800",
|
|
208
|
+
"@ledgerhq/hw-app-eth": "^6.47.1-nightly.20251118023800",
|
|
208
209
|
"@ledgerhq/hw-app-cosmos": "^6.32.9",
|
|
209
|
-
"@ledgerhq/hw-app-eth": "^6.47.1-nightly.20251115023630",
|
|
210
210
|
"@ledgerhq/hw-app-exchange": "^0.17.0",
|
|
211
211
|
"@ledgerhq/hw-app-hedera": "^1.2.9",
|
|
212
|
-
"@ledgerhq/hw-app-icon": "^1.3.9",
|
|
213
212
|
"@ledgerhq/hw-app-kaspa": "^1.3.2",
|
|
213
|
+
"@ledgerhq/hw-app-icon": "^1.3.9",
|
|
214
214
|
"@ledgerhq/hw-app-multiversx": "^6.26.0",
|
|
215
215
|
"@ledgerhq/hw-app-near": "^6.31.9",
|
|
216
216
|
"@ledgerhq/hw-app-polkadot": "^6.34.9",
|
|
217
217
|
"@ledgerhq/hw-app-str": "^7.2.9",
|
|
218
|
-
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
219
218
|
"@ledgerhq/hw-app-tezos": "^6.31.9",
|
|
219
|
+
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
220
220
|
"@ledgerhq/hw-app-trx": "^6.31.9",
|
|
221
221
|
"@ledgerhq/hw-app-vet": "^0.7.0",
|
|
222
222
|
"@ledgerhq/hw-app-xrp": "^6.32.7",
|
|
223
223
|
"@ledgerhq/hw-bolos": "^6.32.9",
|
|
224
224
|
"@ledgerhq/hw-transport": "6.31.13",
|
|
225
225
|
"@ledgerhq/hw-transport-mocker": "^6.29.13",
|
|
226
|
-
"@ledgerhq/ledger-
|
|
227
|
-
"@ledgerhq/ledger-trust-service": "^0.4.2-nightly.20251115023630",
|
|
228
|
-
"@ledgerhq/live-countervalues": "^0.10.0-nightly.20251115023630",
|
|
226
|
+
"@ledgerhq/ledger-trust-service": "^0.4.2-nightly.20251118023800",
|
|
229
227
|
"@ledgerhq/live-config": "^3.2.0",
|
|
230
|
-
"@ledgerhq/live-countervalues
|
|
228
|
+
"@ledgerhq/live-countervalues": "^0.10.0-nightly.20251118023800",
|
|
229
|
+
"@ledgerhq/live-countervalues-react": "^0.7.2-nightly.20251118023800",
|
|
230
|
+
"@ledgerhq/ledger-cal-service": "^1.9.0-nightly.20251118023800",
|
|
231
231
|
"@ledgerhq/live-dmk-shared": "^0.15.0",
|
|
232
|
-
"@ledgerhq/live-env": "^2.21.0-nightly.
|
|
232
|
+
"@ledgerhq/live-env": "^2.21.0-nightly.20251118023800",
|
|
233
233
|
"@ledgerhq/live-hooks": "0.2.0",
|
|
234
|
-
"@ledgerhq/live-network": "^2.1.1-nightly.
|
|
235
|
-
"@ledgerhq/live-signer-canton": "^0.5.1-nightly.20251115023630",
|
|
234
|
+
"@ledgerhq/live-network": "^2.1.1-nightly.20251118023800",
|
|
236
235
|
"@ledgerhq/live-promise": "^0.1.1",
|
|
237
|
-
"@ledgerhq/live-signer-
|
|
238
|
-
"@ledgerhq/live-signer-
|
|
239
|
-
"@ledgerhq/live-
|
|
236
|
+
"@ledgerhq/live-signer-canton": "^0.5.1-nightly.20251118023800",
|
|
237
|
+
"@ledgerhq/live-signer-evm": "^0.10.1-nightly.20251118023800",
|
|
238
|
+
"@ledgerhq/live-signer-solana": "^0.6.1-nightly.20251118023800",
|
|
239
|
+
"@ledgerhq/live-wallet": "^0.16.0-nightly.20251118023800",
|
|
240
240
|
"@ledgerhq/logs": "^6.13.0",
|
|
241
|
-
"@ledgerhq/speculos-transport": "^0.2.15-nightly.
|
|
242
|
-
"@ledgerhq/wallet-api-acre-module": "^0.
|
|
243
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.
|
|
241
|
+
"@ledgerhq/speculos-transport": "^0.2.15-nightly.20251118023800",
|
|
242
|
+
"@ledgerhq/wallet-api-acre-module": "^0.10.0-nightly.20251118023800",
|
|
243
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.19.0-nightly.20251118023800"
|
|
244
244
|
},
|
|
245
245
|
"devDependencies": {
|
|
246
246
|
"@solana/web3.js": "1.95.4",
|
|
@@ -288,10 +288,10 @@
|
|
|
288
288
|
"undici": "6.19.2",
|
|
289
289
|
"uuid": "^8.3.2",
|
|
290
290
|
"ws": "7",
|
|
291
|
-
"@ledgerhq/device-react": "^0.3.2-nightly.
|
|
291
|
+
"@ledgerhq/device-react": "^0.3.2-nightly.20251118023800",
|
|
292
292
|
"@ledgerhq/types-cryptoassets": "^7.30.0",
|
|
293
293
|
"@ledgerhq/types-devices": "^6.27.0",
|
|
294
|
-
"@ledgerhq/types-live": "^6.89.0-nightly.
|
|
294
|
+
"@ledgerhq/types-live": "^6.89.0-nightly.20251118023800"
|
|
295
295
|
},
|
|
296
296
|
"scripts": {
|
|
297
297
|
"build": "zx ./scripts/build-ts.mjs",
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Currency,
|
|
3
|
-
CryptoCurrency,
|
|
4
|
-
CryptoOrTokenCurrency,
|
|
5
|
-
TokenCurrency,
|
|
6
|
-
} from "@ledgerhq/types-cryptoassets";
|
|
7
|
-
import { makeRe } from "minimatch";
|
|
8
|
-
import { listTokens } from "@ledgerhq/cryptoassets";
|
|
9
|
-
import { listSupportedCurrencies } from "@ledgerhq/coin-framework/currencies/index";
|
|
1
|
+
import { Currency, CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
10
2
|
|
|
11
3
|
export function isCryptoCurrency(currency: Currency): currency is CryptoCurrency {
|
|
12
4
|
return currency.type === "CryptoCurrency";
|
|
@@ -20,39 +12,6 @@ export function isUTXOCompliant(currencyFamily: string): boolean {
|
|
|
20
12
|
return currencyFamily === "bitcoin" || currencyFamily === "cardano";
|
|
21
13
|
}
|
|
22
14
|
|
|
23
|
-
export function listCurrencies(includeTokens: boolean): CryptoOrTokenCurrency[] {
|
|
24
|
-
const currencies = listSupportedCurrencies();
|
|
25
|
-
|
|
26
|
-
if (!includeTokens) {
|
|
27
|
-
return currencies;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const allTokens = listTokens();
|
|
31
|
-
|
|
32
|
-
return [...currencies, ...allTokens];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
15
|
export type CurrencyFilters = {
|
|
36
16
|
currencies?: string[];
|
|
37
17
|
};
|
|
38
|
-
|
|
39
|
-
export function filterCurrencies(
|
|
40
|
-
currencies: CryptoOrTokenCurrency[],
|
|
41
|
-
filters: CurrencyFilters,
|
|
42
|
-
): CryptoOrTokenCurrency[] {
|
|
43
|
-
const filterCurrencyRegexes = filters.currencies
|
|
44
|
-
? filters.currencies.map(filter => makeRe(filter))
|
|
45
|
-
: null;
|
|
46
|
-
|
|
47
|
-
return currencies.filter(currency => {
|
|
48
|
-
if (
|
|
49
|
-
filterCurrencyRegexes &&
|
|
50
|
-
filterCurrencyRegexes.length &&
|
|
51
|
-
!filterCurrencyRegexes.some(regex => currency.id.match(regex))
|
|
52
|
-
) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return true;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
@@ -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,9 @@ 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(() =>
|
|
9
|
+
const { result } = renderHook(() =>
|
|
10
|
+
useBatteryStatuses({ deviceName: null, statuses: [], enabled: true }),
|
|
11
|
+
);
|
|
10
12
|
expect(() => result.current.cancelRequest()).not.toThrow();
|
|
11
13
|
});
|
|
12
14
|
});
|
|
@@ -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
|
enabled: boolean;
|
|
16
17
|
};
|
|
@@ -29,6 +30,7 @@ export type UseBatteryStatusesArgs = {
|
|
|
29
30
|
*/
|
|
30
31
|
export const useBatteryStatuses = ({
|
|
31
32
|
deviceId,
|
|
33
|
+
deviceName,
|
|
32
34
|
statuses,
|
|
33
35
|
enabled,
|
|
34
36
|
}: UseBatteryStatusesArgs): {
|
|
@@ -56,6 +58,7 @@ export const useBatteryStatuses = ({
|
|
|
56
58
|
if (nonce > 0 && deviceId) {
|
|
57
59
|
const sub = getBatteryStatusesAction({
|
|
58
60
|
deviceId,
|
|
61
|
+
deviceName,
|
|
59
62
|
statuses,
|
|
60
63
|
}).subscribe({
|
|
61
64
|
next: state => {
|
|
@@ -90,7 +93,7 @@ export const useBatteryStatuses = ({
|
|
|
90
93
|
sub.unsubscribe();
|
|
91
94
|
};
|
|
92
95
|
}
|
|
93
|
-
}, [deviceId, lowBatteryPercentage, statuses, nonce, enabled]);
|
|
96
|
+
}, [deviceId, deviceName, lowBatteryPercentage, statuses, nonce, enabled]);
|
|
94
97
|
|
|
95
98
|
const triggerRequest = useCallback(() => {
|
|
96
99
|
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 =>
|