@ledgerhq/live-common 34.48.0-nightly.1 → 34.48.0-nightly.10
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/__tests__/test-helpers/environment.js +1 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/apps/inlineAppInstall.d.ts +1 -3
- package/lib/apps/inlineAppInstall.d.ts.map +1 -1
- package/lib/apps/inlineAppInstall.js +2 -2
- package/lib/apps/inlineAppInstall.js.map +1 -1
- package/lib/apps/react.d.ts +1 -2
- package/lib/apps/react.d.ts.map +1 -1
- package/lib/apps/react.js +2 -2
- package/lib/apps/react.js.map +1 -1
- package/lib/apps/runner.d.ts +2 -4
- package/lib/apps/runner.d.ts.map +1 -1
- package/lib/apps/runner.js +3 -4
- package/lib/apps/runner.js.map +1 -1
- package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib/bridge/crypto-assets/index.js +0 -4
- package/lib/bridge/crypto-assets/index.js.map +1 -1
- package/lib/bridge/crypto-assets/index.test.js +0 -36
- package/lib/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts +2 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.js +2 -2
- package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.js +10 -6
- package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.d.ts +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.js +8 -0
- package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
- package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.js +3 -2
- package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/signer/Eth.js +51 -0
- package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -0
- package/lib/bridge/generic-alpaca/signer/index.d.ts +2 -10
- package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.js +2 -2
- package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/types.d.ts +11 -0
- package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +144 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
- package/lib/bridge/generic-alpaca/utils.d.ts +2 -0
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +15 -1
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.test.js +21 -0
- package/lib/bridge/generic-alpaca/utils.test.js.map +1 -1
- package/lib/config/sharedConfig.d.ts.map +1 -1
- package/lib/config/sharedConfig.js +30 -26
- package/lib/config/sharedConfig.js.map +1 -1
- package/lib/e2e/enum/Account.d.ts +2 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +2 -0
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +1 -0
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/AppInfos.js +1 -0
- package/lib/e2e/enum/AppInfos.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +1 -0
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +1 -0
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +2 -1
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +1 -0
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/enum/Network.d.ts +2 -1
- package/lib/e2e/enum/Network.d.ts.map +1 -1
- package/lib/e2e/enum/Network.js +1 -0
- package/lib/e2e/enum/Network.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +4 -0
- package/lib/e2e/families/kaspa.d.ts.map +1 -0
- package/lib/e2e/families/kaspa.js +23 -0
- package/lib/e2e/families/kaspa.js.map +1 -0
- package/lib/e2e/index.d.ts +3 -8
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +13 -0
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/swap/transactionStrategies.d.ts +38 -11
- package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib/exchange/swap/transactionStrategies.js +93 -47
- package/lib/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib/families/canton/bridge/mock-data.d.ts +6 -0
- package/lib/families/canton/bridge/mock-data.d.ts.map +1 -0
- package/lib/families/canton/bridge/mock-data.js +120 -0
- package/lib/families/canton/bridge/mock-data.js.map +1 -0
- package/lib/families/canton/bridge/mock.d.ts +12 -0
- package/lib/families/canton/bridge/mock.d.ts.map +1 -0
- package/lib/families/canton/bridge/mock.js +154 -0
- package/lib/families/canton/bridge/mock.js.map +1 -0
- package/lib/families/canton/config.js +7 -6
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/canton/setup.d.ts.map +1 -1
- package/lib/families/canton/setup.js +10 -4
- package/lib/families/canton/setup.js.map +1 -1
- package/lib/families/evm/config.js +2 -2
- package/lib/families/evm/config.js.map +1 -1
- package/lib/families/kaspa/bridge.integration.test.d.ts +2 -0
- package/lib/families/kaspa/bridge.integration.test.d.ts.map +1 -0
- package/lib/families/kaspa/bridge.integration.test.js +7 -0
- package/lib/families/kaspa/bridge.integration.test.js.map +1 -0
- package/lib/families/kaspa/config.d.ts +3 -0
- package/lib/families/kaspa/config.d.ts.map +1 -0
- package/lib/families/kaspa/config.js +14 -0
- package/lib/families/kaspa/config.js.map +1 -0
- package/lib/families/kaspa/react.d.ts +4 -0
- package/lib/families/kaspa/react.d.ts.map +1 -0
- package/lib/families/kaspa/react.js +18 -0
- package/lib/families/kaspa/react.js.map +1 -0
- package/lib/families/kaspa/setup.d.ts +18 -0
- package/lib/families/kaspa/setup.d.ts.map +1 -0
- package/lib/families/kaspa/setup.js +24 -0
- package/lib/families/kaspa/setup.js.map +1 -0
- package/lib/families/kaspa/types.d.ts +2 -0
- package/lib/families/kaspa/types.d.ts.map +1 -0
- package/lib/families/kaspa/types.js +18 -0
- package/lib/families/kaspa/types.js.map +1 -0
- package/lib/families/xrp/setup.d.ts +2 -2
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +4 -3
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +24 -22
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/bridge/mock.d.ts +9 -1
- package/lib/generated/bridge/mock.d.ts.map +1 -1
- package/lib/generated/bridge/mock.js +26 -24
- package/lib/generated/bridge/mock.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +13 -2
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/generated/cli-transaction.js +28 -26
- package/lib/generated/cli-transaction.js.map +1 -1
- package/lib/generated/deviceTransactionConfig.d.ts +2 -0
- package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/generated/deviceTransactionConfig.js +24 -22
- package/lib/generated/deviceTransactionConfig.js.map +1 -1
- package/lib/generated/hw-getAddress.d.ts +1 -0
- package/lib/generated/hw-getAddress.d.ts.map +1 -1
- package/lib/generated/hw-getAddress.js +28 -26
- package/lib/generated/hw-getAddress.js.map +1 -1
- package/lib/generated/platformAdapter.d.ts +1 -1
- package/lib/generated/specs.d.ts +1 -1
- package/lib/generated/transaction.d.ts +11 -3
- package/lib/generated/transaction.d.ts.map +1 -1
- package/lib/generated/transaction.js +28 -26
- package/lib/generated/transaction.js.map +1 -1
- package/lib/generated/types.d.ts +5 -4
- package/lib/generated/types.d.ts.map +1 -1
- package/lib/generated/walletApiAdapter.d.ts +1 -1
- package/lib/hw/actions/app.d.ts.map +1 -1
- package/lib/hw/actions/app.js.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.d.ts.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.js +2 -0
- package/lib/hw/getDeviceNameMaxLength.js.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.test.js +12 -0
- package/lib/hw/getDeviceNameMaxLength.test.js.map +1 -1
- package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib/modularDrawer/data/state-manager/api.js +3 -2
- package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib/modularDrawer/data/state-manager/types.d.ts +1 -0
- package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts +3 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.js +6 -3
- package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
- package/lib/modularDrawer/hooks/useSearch.d.ts +16 -0
- package/lib/modularDrawer/hooks/useSearch.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useSearch.js +24 -0
- package/lib/modularDrawer/hooks/useSearch.js.map +1 -0
- package/lib/notifications/ServiceStatusProvider/index.d.ts +16 -1
- package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.js +31 -7
- package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
- package/lib/notifications/ServiceStatusProvider/index.test.js +88 -0
- package/lib/notifications/ServiceStatusProvider/index.test.js.map +1 -0
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
- package/lib/notifications/ServiceStatusProvider/ledger-components.js +16 -0
- package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
- package/lib/wallet-api/ACRE/server.d.ts +13 -6
- package/lib/wallet-api/ACRE/server.d.ts.map +1 -1
- package/lib/wallet-api/ACRE/server.js +142 -1
- package/lib/wallet-api/ACRE/server.js.map +1 -1
- package/lib/wallet-api/ACRE/server.test.d.ts +2 -0
- package/lib/wallet-api/ACRE/server.test.d.ts.map +1 -0
- package/lib/wallet-api/ACRE/server.test.js +393 -0
- package/lib/wallet-api/ACRE/server.test.js.map +1 -0
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +16 -13
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +1 -0
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/apps/inlineAppInstall.d.ts +1 -3
- package/lib-es/apps/inlineAppInstall.d.ts.map +1 -1
- package/lib-es/apps/inlineAppInstall.js +2 -2
- package/lib-es/apps/inlineAppInstall.js.map +1 -1
- package/lib-es/apps/react.d.ts +1 -2
- package/lib-es/apps/react.d.ts.map +1 -1
- package/lib-es/apps/react.js +2 -2
- package/lib-es/apps/react.js.map +1 -1
- package/lib-es/apps/runner.d.ts +2 -4
- package/lib-es/apps/runner.d.ts.map +1 -1
- package/lib-es/apps/runner.js +3 -4
- package/lib-es/apps/runner.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib-es/bridge/crypto-assets/index.js +0 -4
- package/lib-es/bridge/crypto-assets/index.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.test.js +0 -36
- package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +2 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.js +2 -2
- package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.js +10 -6
- package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.js +8 -0
- package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -2
- package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +4 -4
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.js +47 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts +2 -10
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.js +2 -2
- package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/types.d.ts +11 -0
- package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +139 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/utils.d.ts +2 -0
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +13 -0
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.test.js +22 -1
- package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -1
- package/lib-es/config/sharedConfig.d.ts.map +1 -1
- package/lib-es/config/sharedConfig.js +4 -0
- package/lib-es/config/sharedConfig.js.map +1 -1
- package/lib-es/e2e/enum/Account.d.ts +2 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +2 -0
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/AppInfos.js +1 -0
- package/lib-es/e2e/enum/AppInfos.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +1 -0
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +1 -0
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +2 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +1 -0
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/enum/Network.d.ts +2 -1
- package/lib-es/e2e/enum/Network.d.ts.map +1 -1
- package/lib-es/e2e/enum/Network.js +1 -0
- package/lib-es/e2e/enum/Network.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +4 -0
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -0
- package/lib-es/e2e/families/kaspa.js +15 -0
- package/lib-es/e2e/families/kaspa.js.map +1 -0
- package/lib-es/e2e/index.d.ts +3 -8
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +13 -0
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/env.react.d.ts +1 -1
- package/lib-es/env.react.d.ts.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.d.ts +38 -11
- package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.js +87 -44
- package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib-es/families/canton/bridge/mock-data.d.ts +6 -0
- package/lib-es/families/canton/bridge/mock-data.d.ts.map +1 -0
- package/lib-es/families/canton/bridge/mock-data.js +116 -0
- package/lib-es/families/canton/bridge/mock-data.js.map +1 -0
- package/lib-es/families/canton/bridge/mock.d.ts +12 -0
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -0
- package/lib-es/families/canton/bridge/mock.js +152 -0
- package/lib-es/families/canton/bridge/mock.js.map +1 -0
- package/lib-es/families/canton/config.js +7 -6
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/canton/setup.d.ts.map +1 -1
- package/lib-es/families/canton/setup.js +10 -4
- package/lib-es/families/canton/setup.js.map +1 -1
- package/lib-es/families/evm/config.js +2 -2
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/families/kaspa/bridge.integration.test.d.ts +2 -0
- package/lib-es/families/kaspa/bridge.integration.test.d.ts.map +1 -0
- package/lib-es/families/kaspa/bridge.integration.test.js +5 -0
- package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -0
- package/lib-es/families/kaspa/config.d.ts +3 -0
- package/lib-es/families/kaspa/config.d.ts.map +1 -0
- package/lib-es/families/kaspa/config.js +11 -0
- package/lib-es/families/kaspa/config.js.map +1 -0
- package/lib-es/families/kaspa/react.d.ts +4 -0
- package/lib-es/families/kaspa/react.d.ts.map +1 -0
- package/lib-es/families/kaspa/react.js +14 -0
- package/lib-es/families/kaspa/react.js.map +1 -0
- package/lib-es/families/kaspa/setup.d.ts +18 -0
- package/lib-es/families/kaspa/setup.d.ts.map +1 -0
- package/lib-es/families/kaspa/setup.js +16 -0
- package/lib-es/families/kaspa/setup.js.map +1 -0
- package/lib-es/families/kaspa/types.d.ts +2 -0
- package/lib-es/families/kaspa/types.d.ts.map +1 -0
- package/lib-es/families/kaspa/types.js +2 -0
- package/lib-es/families/kaspa/types.js.map +1 -0
- package/lib-es/families/xrp/setup.d.ts +2 -2
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +4 -3
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -0
- package/lib-es/generated/bridge/js.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.js +2 -0
- package/lib-es/generated/bridge/js.js.map +1 -1
- package/lib-es/generated/bridge/mock.d.ts +9 -1
- package/lib-es/generated/bridge/mock.d.ts.map +1 -1
- package/lib-es/generated/bridge/mock.js +2 -0
- package/lib-es/generated/bridge/mock.js.map +1 -1
- package/lib-es/generated/cli-transaction.d.ts +13 -2
- package/lib-es/generated/cli-transaction.d.ts.map +1 -1
- package/lib-es/generated/cli-transaction.js +2 -0
- package/lib-es/generated/cli-transaction.js.map +1 -1
- package/lib-es/generated/deviceTransactionConfig.d.ts +2 -0
- package/lib-es/generated/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/generated/deviceTransactionConfig.js +2 -0
- package/lib-es/generated/deviceTransactionConfig.js.map +1 -1
- package/lib-es/generated/hw-getAddress.d.ts +1 -0
- package/lib-es/generated/hw-getAddress.d.ts.map +1 -1
- package/lib-es/generated/hw-getAddress.js +2 -0
- package/lib-es/generated/hw-getAddress.js.map +1 -1
- package/lib-es/generated/platformAdapter.d.ts +1 -1
- package/lib-es/generated/specs.d.ts +1 -1
- package/lib-es/generated/transaction.d.ts +11 -3
- package/lib-es/generated/transaction.d.ts.map +1 -1
- package/lib-es/generated/transaction.js +2 -0
- package/lib-es/generated/transaction.js.map +1 -1
- package/lib-es/generated/types.d.ts +5 -4
- package/lib-es/generated/types.d.ts.map +1 -1
- package/lib-es/generated/walletApiAdapter.d.ts +1 -1
- package/lib-es/hw/actions/app.d.ts.map +1 -1
- package/lib-es/hw/actions/app.js.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.d.ts.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.js +2 -0
- package/lib-es/hw/getDeviceNameMaxLength.js.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.test.js +12 -0
- package/lib-es/hw/getDeviceNameMaxLength.test.js.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/api.js +3 -2
- package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/types.d.ts +1 -0
- package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +3 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js +6 -3
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useSearch.d.ts +16 -0
- package/lib-es/modularDrawer/hooks/useSearch.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useSearch.js +20 -0
- package/lib-es/modularDrawer/hooks/useSearch.js.map +1 -0
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts +16 -1
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.js +31 -7
- package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
- package/lib-es/notifications/ServiceStatusProvider/index.test.js +86 -0
- package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +1 -0
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +13 -0
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
- package/lib-es/wallet-api/ACRE/server.d.ts +13 -6
- package/lib-es/wallet-api/ACRE/server.d.ts.map +1 -1
- package/lib-es/wallet-api/ACRE/server.js +140 -2
- package/lib-es/wallet-api/ACRE/server.js.map +1 -1
- package/lib-es/wallet-api/ACRE/server.test.d.ts +2 -0
- package/lib-es/wallet-api/ACRE/server.test.d.ts.map +1 -0
- package/lib-es/wallet-api/ACRE/server.test.js +388 -0
- package/lib-es/wallet-api/ACRE/server.test.js.map +1 -0
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +16 -13
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/package.json +55 -52
- package/src/__tests__/test-helpers/environment.ts +1 -0
- package/src/apps/inlineAppInstall.ts +1 -4
- package/src/apps/react.ts +1 -3
- package/src/apps/runner.ts +1 -8
- package/src/bridge/crypto-assets/index.test.ts +0 -47
- package/src/bridge/crypto-assets/index.ts +0 -5
- package/src/bridge/generic-alpaca/accountBridge.ts +8 -3
- package/src/bridge/generic-alpaca/alpaca/index.ts +13 -18
- package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
- package/src/bridge/generic-alpaca/createTransaction.ts +9 -1
- package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
- package/src/bridge/generic-alpaca/getAccountShape.ts +4 -5
- package/src/bridge/generic-alpaca/signer/Eth.ts +70 -0
- package/src/bridge/generic-alpaca/signer/index.ts +5 -15
- package/src/bridge/generic-alpaca/signer/signTransaction.ts +4 -3
- package/src/bridge/generic-alpaca/signer/types.ts +14 -0
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +173 -0
- package/src/bridge/generic-alpaca/utils.test.ts +29 -1
- package/src/bridge/generic-alpaca/utils.ts +15 -0
- package/src/config/sharedConfig.ts +4 -0
- package/src/e2e/enum/Account.ts +14 -0
- package/src/e2e/enum/AppInfos.ts +2 -0
- package/src/e2e/enum/Currency.ts +2 -0
- package/src/e2e/enum/DeviceLabels.ts +1 -0
- package/src/e2e/enum/Network.ts +1 -0
- package/src/e2e/families/kaspa.ts +17 -0
- package/src/e2e/speculos.ts +13 -0
- package/src/exchange/swap/transactionStrategies.ts +121 -73
- package/src/families/canton/bridge/mock-data.ts +175 -0
- package/src/families/canton/bridge/mock.ts +180 -0
- package/src/families/canton/config.ts +7 -7
- package/src/families/canton/setup.ts +11 -7
- package/src/families/evm/config.ts +2 -2
- package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
- package/src/families/kaspa/bridge.integration.test.ts +5 -0
- package/src/families/kaspa/config.ts +12 -0
- package/src/families/kaspa/react.ts +19 -0
- package/src/families/kaspa/setup.ts +27 -0
- package/src/families/kaspa/types.ts +1 -0
- package/src/featureFlags/defaultFeatures.ts +4 -3
- package/src/generated/bridge/js.ts +2 -0
- package/src/generated/bridge/mock.ts +2 -0
- package/src/generated/cli-transaction.ts +2 -0
- package/src/generated/deviceTransactionConfig.ts +2 -0
- package/src/generated/hw-getAddress.ts +2 -0
- package/src/generated/transaction.ts +2 -0
- package/src/generated/types.ts +10 -0
- package/src/hw/actions/app.ts +0 -1
- package/src/hw/getDeviceNameMaxLength.test.ts +16 -0
- package/src/hw/getDeviceNameMaxLength.ts +2 -0
- package/src/modularDrawer/data/state-manager/api.ts +4 -2
- package/src/modularDrawer/data/state-manager/types.ts +1 -0
- package/src/modularDrawer/hooks/useAssetsData.ts +24 -9
- package/src/modularDrawer/hooks/useSearch.ts +52 -0
- package/src/notifications/ServiceStatusProvider/index.test.ts +102 -0
- package/src/notifications/ServiceStatusProvider/index.tsx +37 -12
- package/src/notifications/ServiceStatusProvider/ledger-components.ts +12 -0
- package/src/wallet-api/ACRE/server.test.ts +470 -0
- package/src/wallet-api/ACRE/server.ts +202 -14
- package/src/wallet-api/Exchange/server.ts +17 -14
- package/lib/bridge/crypto-assets/cal-integration.d.ts +0 -4
- package/lib/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.js +0 -26
- package/lib/bridge/crypto-assets/cal-integration.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
- package/lib/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.test.js +0 -45
- package/lib/bridge/crypto-assets/cal-integration.test.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.d.ts +0 -14
- package/lib/bridge/crypto-assets/cal-store.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.js +0 -58
- package/lib/bridge/crypto-assets/cal-store.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.test.d.ts +0 -2
- package/lib/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.test.js +0 -70
- package/lib/bridge/crypto-assets/cal-store.test.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.d.ts +0 -4
- package/lib-es/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.js +0 -21
- package/lib-es/bridge/crypto-assets/cal-integration.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
- package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.test.js +0 -43
- package/lib-es/bridge/crypto-assets/cal-integration.test.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.d.ts +0 -14
- package/lib-es/bridge/crypto-assets/cal-store.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.js +0 -54
- package/lib-es/bridge/crypto-assets/cal-store.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.test.d.ts +0 -2
- package/lib-es/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.test.js +0 -68
- package/lib-es/bridge/crypto-assets/cal-store.test.js.map +0 -1
- package/src/bridge/crypto-assets/cal-integration.test.ts +0 -53
- package/src/bridge/crypto-assets/cal-integration.ts +0 -23
- package/src/bridge/crypto-assets/cal-store.test.ts +0 -93
- package/src/bridge/crypto-assets/cal-store.ts +0 -63
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.48.0-nightly.
|
4
|
+
"version": "34.48.0-nightly.10",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
@@ -106,7 +106,7 @@
|
|
106
106
|
"@dfinity/agent": "^0.21.0",
|
107
107
|
"@dfinity/candid": "^0.21.0",
|
108
108
|
"@dfinity/principal": "^0.15.6",
|
109
|
-
"@ledgerhq/device-management-kit": "0.
|
109
|
+
"@ledgerhq/device-management-kit": "0.9.0",
|
110
110
|
"@ledgerhq/live-app-sdk": "^0.8.1",
|
111
111
|
"@ledgerhq/wallet-api-client": "^1.10.0",
|
112
112
|
"@ledgerhq/wallet-api-core": "^1.22.0",
|
@@ -138,6 +138,7 @@
|
|
138
138
|
"bip39": "^3.0.4",
|
139
139
|
"bs58": "^4.0.1",
|
140
140
|
"date-fns": "^2.23.0",
|
141
|
+
"ethers": "6.15.0",
|
141
142
|
"expect": "^27.4.6",
|
142
143
|
"fuse.js": "^6.6.2",
|
143
144
|
"i18next": "20.6.1",
|
@@ -165,47 +166,49 @@
|
|
165
166
|
"xstate": "^5.19.2",
|
166
167
|
"yargs": "^17.0.0",
|
167
168
|
"zod": "^3.22.4",
|
168
|
-
"@ledgerhq/coin-
|
169
|
-
"@ledgerhq/coin-
|
170
|
-
"@ledgerhq/coin-bitcoin": "^0.21.1-nightly.
|
171
|
-
"@ledgerhq/coin-canton": "^0.5.0-nightly.
|
172
|
-
"@ledgerhq/coin-cardano": "^0.12.1-nightly.
|
173
|
-
"@ledgerhq/coin-casper": "^2.1.1-nightly.
|
174
|
-
"@ledgerhq/coin-celo": "^1.4.0-nightly.
|
175
|
-
"@ledgerhq/coin-cosmos": "^0.17.1-nightly.
|
176
|
-
"@ledgerhq/coin-evm": "^2.30.0-nightly.
|
177
|
-
"@ledgerhq/coin-filecoin": "^1.11.1-nightly.
|
178
|
-
"@ledgerhq/coin-framework": "^6.4.0-nightly.
|
179
|
-
"@ledgerhq/coin-hedera": "^1.11.1-nightly.
|
180
|
-
"@ledgerhq/coin-icon": "^0.12.1-nightly.
|
181
|
-
"@ledgerhq/coin-internet_computer": "^1.8.1-nightly.
|
182
|
-
"@ledgerhq/coin-
|
183
|
-
"@ledgerhq/coin-
|
184
|
-
"@ledgerhq/coin-
|
185
|
-
"@ledgerhq/coin-
|
186
|
-
"@ledgerhq/coin-
|
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/
|
196
|
-
"@ledgerhq/
|
197
|
-
"@ledgerhq/
|
169
|
+
"@ledgerhq/coin-algorand": "^0.10.1-nightly.5",
|
170
|
+
"@ledgerhq/coin-aptos": "^3.3.0-nightly.5",
|
171
|
+
"@ledgerhq/coin-bitcoin": "^0.21.1-nightly.5",
|
172
|
+
"@ledgerhq/coin-canton": "^0.5.0-nightly.6",
|
173
|
+
"@ledgerhq/coin-cardano": "^0.12.1-nightly.5",
|
174
|
+
"@ledgerhq/coin-casper": "^2.1.1-nightly.5",
|
175
|
+
"@ledgerhq/coin-celo": "^1.4.0-nightly.6",
|
176
|
+
"@ledgerhq/coin-cosmos": "^0.17.1-nightly.5",
|
177
|
+
"@ledgerhq/coin-evm": "^2.30.0-nightly.6",
|
178
|
+
"@ledgerhq/coin-filecoin": "^1.11.1-nightly.5",
|
179
|
+
"@ledgerhq/coin-framework": "^6.4.0-nightly.5",
|
180
|
+
"@ledgerhq/coin-hedera": "^1.11.1-nightly.5",
|
181
|
+
"@ledgerhq/coin-icon": "^0.12.1-nightly.5",
|
182
|
+
"@ledgerhq/coin-internet_computer": "^1.8.1-nightly.5",
|
183
|
+
"@ledgerhq/coin-kaspa": "^1.1.0-nightly.6",
|
184
|
+
"@ledgerhq/coin-mina": "^1.2.1-nightly.5",
|
185
|
+
"@ledgerhq/coin-multiversx": "^0.5.1-nightly.5",
|
186
|
+
"@ledgerhq/coin-near": "^0.13.1-nightly.5",
|
187
|
+
"@ledgerhq/coin-polkadot": "^6.10.0-nightly.5",
|
188
|
+
"@ledgerhq/coin-solana": "^0.32.1-nightly.5",
|
189
|
+
"@ledgerhq/coin-stacks": "^0.9.1-nightly.5",
|
190
|
+
"@ledgerhq/coin-stellar": "^6.4.0-nightly.5",
|
191
|
+
"@ledgerhq/coin-sui": "^0.13.0-nightly.7",
|
192
|
+
"@ledgerhq/coin-tezos": "^6.4.0-nightly.5",
|
193
|
+
"@ledgerhq/coin-ton": "^0.14.1-nightly.5",
|
194
|
+
"@ledgerhq/coin-tron": "^5.4.0-nightly.5",
|
195
|
+
"@ledgerhq/coin-vechain": "^2.10.0-nightly.5",
|
196
|
+
"@ledgerhq/coin-xrp": "^7.4.0-nightly.6",
|
197
|
+
"@ledgerhq/crypto-icons-ui": "^1.19.0-nightly.1",
|
198
|
+
"@ledgerhq/cryptoassets": "^13.28.0-nightly.3",
|
199
|
+
"@ledgerhq/device-core": "^0.6.3-nightly.2",
|
198
200
|
"@ledgerhq/devices": "8.5.1",
|
199
201
|
"@ledgerhq/errors": "^6.25.0",
|
200
202
|
"@ledgerhq/hw-app-algorand": "^6.31.6",
|
201
203
|
"@ledgerhq/hw-app-aptos": "^6.34.6",
|
202
204
|
"@ledgerhq/hw-app-btc": "^10.10.2",
|
203
|
-
"@ledgerhq/hw-app-celo": "^6.34.3-nightly.
|
205
|
+
"@ledgerhq/hw-app-celo": "^6.34.3-nightly.2",
|
204
206
|
"@ledgerhq/hw-app-cosmos": "^6.32.6",
|
205
|
-
"@ledgerhq/hw-app-eth": "^6.45.18-nightly.
|
206
|
-
"@ledgerhq/hw-app-exchange": "^0.13.
|
207
|
+
"@ledgerhq/hw-app-eth": "^6.45.18-nightly.2",
|
208
|
+
"@ledgerhq/hw-app-exchange": "^0.13.3-nightly.0",
|
207
209
|
"@ledgerhq/hw-app-hedera": "^1.2.6",
|
208
210
|
"@ledgerhq/hw-app-icon": "^1.3.6",
|
211
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.0-nightly.0",
|
209
212
|
"@ledgerhq/hw-app-multiversx": "^6.25.1",
|
210
213
|
"@ledgerhq/hw-app-near": "^6.31.6",
|
211
214
|
"@ledgerhq/hw-app-polkadot": "^6.34.6",
|
@@ -213,27 +216,27 @@
|
|
213
216
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
214
217
|
"@ledgerhq/hw-app-tezos": "^6.31.6",
|
215
218
|
"@ledgerhq/hw-app-trx": "^6.31.6",
|
216
|
-
"@ledgerhq/hw-app-vet": "^0.
|
219
|
+
"@ledgerhq/hw-app-vet": "^0.6.0-nightly.3",
|
217
220
|
"@ledgerhq/hw-app-xrp": "^6.32.4",
|
218
221
|
"@ledgerhq/hw-transport": "^6.31.10",
|
219
222
|
"@ledgerhq/hw-transport-mocker": "^6.29.10",
|
220
|
-
"@ledgerhq/ledger-cal-service": "^1.3.2-nightly.
|
223
|
+
"@ledgerhq/ledger-cal-service": "^1.3.2-nightly.1",
|
221
224
|
"@ledgerhq/live-config": "^3.2.0",
|
222
|
-
"@ledgerhq/live-countervalues": "^0.7.1-nightly.
|
223
|
-
"@ledgerhq/live-countervalues-react": "^0.5.2-nightly.
|
224
|
-
"@ledgerhq/live-dmk-shared": "^0.12.
|
225
|
-
"@ledgerhq/live-env": "^2.16.0-nightly.
|
225
|
+
"@ledgerhq/live-countervalues": "^0.7.1-nightly.5",
|
226
|
+
"@ledgerhq/live-countervalues-react": "^0.5.2-nightly.5",
|
227
|
+
"@ledgerhq/live-dmk-shared": "^0.12.4-nightly.0",
|
228
|
+
"@ledgerhq/live-env": "^2.16.0-nightly.1",
|
226
229
|
"@ledgerhq/live-hooks": "0.1.0",
|
227
|
-
"@ledgerhq/live-network": "^2.0.17-nightly.
|
228
|
-
"@ledgerhq/live-nft": "^0.8.20-nightly.
|
230
|
+
"@ledgerhq/live-network": "^2.0.17-nightly.1",
|
231
|
+
"@ledgerhq/live-nft": "^0.8.20-nightly.5",
|
229
232
|
"@ledgerhq/live-promise": "^0.1.1",
|
230
|
-
"@ledgerhq/live-signer-canton": "^0.2.4-nightly.
|
231
|
-
"@ledgerhq/live-signer-evm": "^0.7.5-nightly.
|
232
|
-
"@ledgerhq/live-signer-solana": "^0.5.5-nightly.
|
233
|
-
"@ledgerhq/live-wallet": "^0.13.1-nightly.
|
233
|
+
"@ledgerhq/live-signer-canton": "^0.2.4-nightly.6",
|
234
|
+
"@ledgerhq/live-signer-evm": "^0.7.5-nightly.7",
|
235
|
+
"@ledgerhq/live-signer-solana": "^0.5.5-nightly.5",
|
236
|
+
"@ledgerhq/live-wallet": "^0.13.1-nightly.6",
|
234
237
|
"@ledgerhq/logs": "^6.13.0",
|
235
|
-
"@ledgerhq/speculos-transport": "^0.2.10-nightly.
|
236
|
-
"@ledgerhq/wallet-api-acre-module": "^0.
|
238
|
+
"@ledgerhq/speculos-transport": "^0.2.10-nightly.1",
|
239
|
+
"@ledgerhq/wallet-api-acre-module": "^0.7.0-nightly.0",
|
237
240
|
"@ledgerhq/wallet-api-exchange-module": "^0.16.0"
|
238
241
|
},
|
239
242
|
"devDependencies": {
|
@@ -282,10 +285,10 @@
|
|
282
285
|
"undici": "6.19.2",
|
283
286
|
"uuid": "^8.3.2",
|
284
287
|
"ws": "7",
|
285
|
-
"@ledgerhq/device-react": "^0.2.44-nightly.
|
286
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
288
|
+
"@ledgerhq/device-react": "^0.2.44-nightly.2",
|
289
|
+
"@ledgerhq/types-cryptoassets": "^7.27.0-nightly.0",
|
287
290
|
"@ledgerhq/types-devices": "^6.27.0",
|
288
|
-
"@ledgerhq/types-live": "^6.
|
291
|
+
"@ledgerhq/types-live": "^6.84.0-nightly.1"
|
289
292
|
},
|
290
293
|
"scripts": {
|
291
294
|
"build": "zx ./scripts/build-ts.mjs",
|
@@ -9,7 +9,6 @@ import { runAllWithProgress } from "./runner";
|
|
9
9
|
import { InlineAppInstallEvent } from "./types";
|
10
10
|
import { mergeMap, map, throttleTime } from "rxjs/operators";
|
11
11
|
import { LocalTracer } from "@ledgerhq/logs";
|
12
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
13
12
|
|
14
13
|
/**
|
15
14
|
* Tries to install a list of apps
|
@@ -26,13 +25,11 @@ const inlineAppInstall = ({
|
|
26
25
|
appNames,
|
27
26
|
onSuccessObs,
|
28
27
|
allowPartialDependencies = false,
|
29
|
-
storage,
|
30
28
|
}: {
|
31
29
|
transport: Transport;
|
32
30
|
appNames: string[];
|
33
31
|
onSuccessObs?: () => Observable<any>;
|
34
32
|
allowPartialDependencies?: boolean;
|
35
|
-
storage?: StorageProvider<AppStorageType>;
|
36
33
|
}): Observable<InlineAppInstallEvent | ConnectAppEvent> => {
|
37
34
|
const tracer = new LocalTracer("hw", {
|
38
35
|
...transport.getTraceContext(),
|
@@ -105,7 +102,7 @@ const inlineAppInstall = ({
|
|
105
102
|
installQueue: state.installQueue,
|
106
103
|
}),
|
107
104
|
maybeSkippedEvent,
|
108
|
-
runAllWithProgress(state, exec
|
105
|
+
runAllWithProgress(state, exec).pipe(
|
109
106
|
throttleTime(100),
|
110
107
|
map(({ globalProgress, itemProgress, installQueue, currentAppOp }) => ({
|
111
108
|
type: "inline-install",
|
package/src/apps/react.ts
CHANGED
@@ -12,14 +12,12 @@ import {
|
|
12
12
|
import { runAppOp } from "./runner";
|
13
13
|
import { App } from "@ledgerhq/types-live";
|
14
14
|
import { useFeatureFlags } from "../featureFlags";
|
15
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
16
15
|
|
17
16
|
type UseAppsRunnerResult = [State, (arg0: Action) => void];
|
18
17
|
// use for React apps. support dynamic change of the state.
|
19
18
|
export const useAppsRunner = (
|
20
19
|
listResult: ListAppsResult,
|
21
20
|
exec: Exec,
|
22
|
-
storage: StorageProvider<AppStorageType>,
|
23
21
|
appsToRestore?: string[],
|
24
22
|
): UseAppsRunnerResult => {
|
25
23
|
// $FlowFixMe for ledger-live-mobile older react/flow version
|
@@ -36,7 +34,7 @@ export const useAppsRunner = (
|
|
36
34
|
|
37
35
|
useEffect(() => {
|
38
36
|
if (appOp) {
|
39
|
-
const sub = runAppOp({ state, appOp, exec
|
37
|
+
const sub = runAppOp({ state, appOp, exec }).subscribe(event => {
|
40
38
|
dispatch({
|
41
39
|
type: "onRunnerEvent",
|
42
40
|
event,
|
package/src/apps/runner.ts
CHANGED
@@ -13,18 +13,15 @@ import type { Exec, State, AppOp, RunnerEvent, Action } from "./types";
|
|
13
13
|
import { reducer, getActionPlan, getNextAppOp } from "./logic";
|
14
14
|
import { delay } from "../promise";
|
15
15
|
import { getEnv } from "@ledgerhq/live-env";
|
16
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
17
16
|
|
18
17
|
export const runAppOp = ({
|
19
18
|
state,
|
20
19
|
appOp,
|
21
20
|
exec,
|
22
|
-
storage,
|
23
21
|
}: {
|
24
22
|
state: State;
|
25
23
|
appOp: AppOp;
|
26
24
|
exec: Exec;
|
27
|
-
storage?: StorageProvider<AppStorageType>;
|
28
25
|
}): Observable<RunnerEvent> => {
|
29
26
|
const { appByName, deviceInfo, deviceModel } = state;
|
30
27
|
const app = appByName[appOp.name];
|
@@ -56,7 +53,6 @@ export const runAppOp = ({
|
|
56
53
|
targetId: deviceInfo.targetId,
|
57
54
|
app,
|
58
55
|
modelId: deviceModel.id,
|
59
|
-
...(storage ? { storage } : {}),
|
60
56
|
...(state.skipAppDataBackup ? { skipAppDataBackup: true } : {}),
|
61
57
|
}),
|
62
58
|
).pipe(
|
@@ -99,7 +95,6 @@ type InlineInstallProgress = {
|
|
99
95
|
export const runAllWithProgress = (
|
100
96
|
state: State,
|
101
97
|
exec: Exec,
|
102
|
-
storage?: StorageProvider<AppStorageType>,
|
103
98
|
precision = 100,
|
104
99
|
): Observable<InlineInstallProgress> => {
|
105
100
|
const total = state.uninstallQueue.length + state.installQueue.length;
|
@@ -110,9 +105,7 @@ export const runAllWithProgress = (
|
|
110
105
|
return p;
|
111
106
|
}
|
112
107
|
|
113
|
-
return concat(
|
114
|
-
...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec, storage })),
|
115
|
-
).pipe(
|
108
|
+
return concat(...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec }))).pipe(
|
116
109
|
map(event => {
|
117
110
|
if (event.type === "runError") {
|
118
111
|
throw event.error;
|
@@ -2,22 +2,8 @@ import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
|
2
2
|
import { getCryptoAssetsStore, setCryptoAssetsStore } from ".";
|
3
3
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
4
4
|
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
5
|
-
import * as calIntegration from "./cal-integration";
|
6
5
|
|
7
6
|
describe("Testing CryptoAssetStore", () => {
|
8
|
-
let isCALIntegrationEnabledSpy: jest.SpyInstance;
|
9
|
-
let getCALStoreSpy: jest.SpyInstance;
|
10
|
-
|
11
|
-
beforeEach(() => {
|
12
|
-
isCALIntegrationEnabledSpy = jest
|
13
|
-
.spyOn(calIntegration, "isCALIntegrationEnabled")
|
14
|
-
.mockReturnValue(false);
|
15
|
-
getCALStoreSpy = jest.spyOn(calIntegration, "getCALStore");
|
16
|
-
});
|
17
|
-
|
18
|
-
afterEach(() => {
|
19
|
-
jest.restoreAllMocks();
|
20
|
-
});
|
21
7
|
it("should return the default methods from cryptoassets libs when feature flag does not exists", () => {
|
22
8
|
LiveConfig.setConfig({
|
23
9
|
some_other_feature: {
|
@@ -82,37 +68,4 @@ describe("Testing CryptoAssetStore", () => {
|
|
82
68
|
const store = getCryptoAssetsStore();
|
83
69
|
expect(store).toBe(newStore);
|
84
70
|
});
|
85
|
-
|
86
|
-
it("should return CAL store when CAL integration is enabled", () => {
|
87
|
-
isCALIntegrationEnabledSpy.mockReturnValue(true);
|
88
|
-
|
89
|
-
const mockCALStore = {} as unknown as CryptoAssetsStore;
|
90
|
-
getCALStoreSpy.mockReturnValue(mockCALStore);
|
91
|
-
|
92
|
-
const store = getCryptoAssetsStore();
|
93
|
-
|
94
|
-
expect(isCALIntegrationEnabledSpy).toHaveBeenCalled();
|
95
|
-
expect(getCALStoreSpy).toHaveBeenCalled();
|
96
|
-
expect(store).toBe(mockCALStore);
|
97
|
-
});
|
98
|
-
|
99
|
-
it("should prioritize CAL integration over feature flags", () => {
|
100
|
-
isCALIntegrationEnabledSpy.mockReturnValue(true);
|
101
|
-
|
102
|
-
LiveConfig.setConfig({
|
103
|
-
feature_cal_lazy_loading: {
|
104
|
-
type: "boolean",
|
105
|
-
default: true,
|
106
|
-
},
|
107
|
-
});
|
108
|
-
|
109
|
-
const mockCALStore = {} as unknown as CryptoAssetsStore;
|
110
|
-
getCALStoreSpy.mockReturnValue(mockCALStore);
|
111
|
-
|
112
|
-
const store = getCryptoAssetsStore();
|
113
|
-
|
114
|
-
expect(store).toBe(mockCALStore);
|
115
|
-
expect(isCALIntegrationEnabledSpy).toHaveBeenCalled();
|
116
|
-
expect(getCALStoreSpy).toHaveBeenCalled();
|
117
|
-
});
|
118
71
|
});
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
2
2
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
3
3
|
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
4
|
-
import { isCALIntegrationEnabled, getCALStore } from "./cal-integration";
|
5
4
|
|
6
5
|
const legacyStore: CryptoAssetsStore = {
|
7
6
|
findTokenByAddress: legacy.findTokenByAddress,
|
@@ -18,10 +17,6 @@ export function setCryptoAssetsStore(store: CryptoAssetsStore) {
|
|
18
17
|
}
|
19
18
|
|
20
19
|
export function getCryptoAssetsStore(): CryptoAssetsStore {
|
21
|
-
if (isCALIntegrationEnabled()) {
|
22
|
-
return getCALStore();
|
23
|
-
}
|
24
|
-
|
25
20
|
const featureEnabled =
|
26
21
|
LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading");
|
27
22
|
if (!featureEnabled) {
|
@@ -14,9 +14,14 @@ import { genericEstimateMaxSpendable } from "./estimateMaxSpendable";
|
|
14
14
|
import { createTransaction } from "./createTransaction";
|
15
15
|
import { genericBroadcast } from "./broadcast";
|
16
16
|
import { genericSignOperation } from "./signOperation";
|
17
|
+
import type { AlpacaSigner } from "./signer/types";
|
17
18
|
|
18
|
-
export function getAlpacaAccountBridge(
|
19
|
-
|
19
|
+
export function getAlpacaAccountBridge(
|
20
|
+
network: string,
|
21
|
+
kind: string,
|
22
|
+
customSigner?: AlpacaSigner,
|
23
|
+
): AccountBridge<any> {
|
24
|
+
const signer = customSigner ?? getSigner(network);
|
20
25
|
return {
|
21
26
|
sync: makeSync({ getAccountShape: genericGetAccountShape(network, kind) }),
|
22
27
|
receive: makeAccountBridgeReceive(getAddressWrapper(signer.getAddress)),
|
@@ -28,5 +33,5 @@ export function getAlpacaAccountBridge(network: string, kind: string): AccountBr
|
|
28
33
|
broadcast: genericBroadcast(network, kind),
|
29
34
|
signOperation: genericSignOperation(network, kind)(signer.context),
|
30
35
|
getSerializedAddressParameters, // NOTE: check wether it should be exposed by coin-module's api instead?
|
31
|
-
} satisfies Partial<AccountBridge<any
|
36
|
+
} satisfies Partial<AccountBridge<any>>;
|
32
37
|
}
|
@@ -2,37 +2,32 @@ import { createApi as createXrpApi } from "@ledgerhq/coin-xrp/api/index";
|
|
2
2
|
import { createApi as createStellarApi } from "@ledgerhq/coin-stellar/api/index";
|
3
3
|
import { createApi as createCantonApi } from "@ledgerhq/coin-canton/api/index";
|
4
4
|
import { createApi as createTronApi } from "@ledgerhq/coin-tron/api/index";
|
5
|
+
import { createApi as createEvmApi } from "@ledgerhq/coin-evm/api/index";
|
5
6
|
import { getCurrencyConfiguration } from "../../../config";
|
6
|
-
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
7
7
|
import { getNetworkAlpacaApi } from "./network/network-alpaca";
|
8
8
|
import { Api } from "@ledgerhq/coin-framework/api/types";
|
9
9
|
import { XrpCoinConfig } from "@ledgerhq/coin-xrp/config";
|
10
10
|
import { StellarCoinConfig } from "@ledgerhq/coin-stellar/config";
|
11
11
|
import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
|
12
12
|
import { TronCoinConfig } from "@ledgerhq/coin-tron/config";
|
13
|
+
import { EvmConfigInfo } from "@ledgerhq/coin-evm/config";
|
14
|
+
import { findCryptoCurrencyByNetwork } from "../utils";
|
13
15
|
|
14
|
-
export function getAlpacaApi(network, kind): Api<any> {
|
16
|
+
export function getAlpacaApi(network: string, kind: string): Api<any> {
|
15
17
|
if (kind === "local") {
|
16
|
-
|
18
|
+
const currency = findCryptoCurrencyByNetwork(network);
|
19
|
+
switch (currency?.family) {
|
17
20
|
case "xrp":
|
18
|
-
return createXrpApi(
|
19
|
-
getCurrencyConfiguration<XrpCoinConfig>(getCryptoCurrencyById("ripple")),
|
20
|
-
) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
|
21
|
+
return createXrpApi(getCurrencyConfiguration<XrpCoinConfig>(currency)) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
|
21
22
|
case "stellar":
|
22
|
-
return createStellarApi(
|
23
|
-
getCurrencyConfiguration<StellarCoinConfig>(getCryptoCurrencyById("stellar")),
|
24
|
-
) as Api<any>;
|
23
|
+
return createStellarApi(getCurrencyConfiguration<StellarCoinConfig>(currency)) as Api<any>;
|
25
24
|
case "canton":
|
26
|
-
return createCantonApi(
|
27
|
-
getCurrencyConfiguration<CantonCoinConfig>(
|
28
|
-
getCryptoCurrencyById("canton_network_devnet"),
|
29
|
-
),
|
30
|
-
) as Api<any>;
|
25
|
+
return createCantonApi(getCurrencyConfiguration<CantonCoinConfig>(currency)) as Api<any>;
|
31
26
|
case "tron":
|
32
|
-
return createTronApi(
|
33
|
-
|
34
|
-
) as Api<any>;
|
27
|
+
return createTronApi(getCurrencyConfiguration<TronCoinConfig>(currency)) as Api<any>;
|
28
|
+
case "evm":
|
29
|
+
return createEvmApi(getCurrencyConfiguration<EvmConfigInfo>(currency), network) as Api<any>;
|
35
30
|
}
|
36
31
|
}
|
37
|
-
return getNetworkAlpacaApi(network) satisfies Partial<Api<any
|
32
|
+
return getNetworkAlpacaApi(network) satisfies Partial<Api<any>>;
|
38
33
|
}
|
@@ -3,6 +3,7 @@ import * as xrpModule from "@ledgerhq/coin-xrp/api/index";
|
|
3
3
|
import * as stellarModule from "@ledgerhq/coin-stellar/api/index";
|
4
4
|
import * as cantonModule from "@ledgerhq/coin-canton/api/index";
|
5
5
|
import * as tronModule from "@ledgerhq/coin-tron/api/index";
|
6
|
+
import * as evmModule from "@ledgerhq/coin-evm/api/index";
|
6
7
|
import * as config from "../../../config";
|
7
8
|
import * as networkApi from "./network/network-alpaca";
|
8
9
|
import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
|
@@ -10,7 +11,7 @@ import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
|
|
10
11
|
const mockApiInstance = { mock: "api" };
|
11
12
|
|
12
13
|
jest.mock("@ledgerhq/cryptoassets/currencies", () => ({
|
13
|
-
|
14
|
+
findCryptoCurrencyById: jest.fn(),
|
14
15
|
}));
|
15
16
|
|
16
17
|
jest.mock("../../../config", () => ({
|
@@ -33,18 +34,37 @@ jest.mock("@ledgerhq/coin-tron/api/index", () => ({
|
|
33
34
|
createApi: jest.fn(),
|
34
35
|
}));
|
35
36
|
|
37
|
+
jest.mock("@ledgerhq/coin-evm/api/index", () => ({
|
38
|
+
createApi: jest.fn(),
|
39
|
+
}));
|
40
|
+
|
36
41
|
jest.mock("./network/network-alpaca", () => ({
|
37
42
|
getNetworkAlpacaApi: jest.fn(),
|
38
43
|
}));
|
39
44
|
|
40
45
|
describe("getAlpacaApi", () => {
|
41
|
-
const mockCurrency = { id: "mock-currency" };
|
42
|
-
|
43
46
|
beforeEach(() => {
|
44
47
|
jest.clearAllMocks();
|
45
48
|
|
46
49
|
// Common mocks
|
47
|
-
(cryptoAssets.
|
50
|
+
(cryptoAssets.findCryptoCurrencyById as jest.Mock).mockImplementation(id => {
|
51
|
+
switch (id) {
|
52
|
+
case "ripple":
|
53
|
+
return { family: "xrp" };
|
54
|
+
case "stellar":
|
55
|
+
return { family: "stellar" };
|
56
|
+
case "canton":
|
57
|
+
return { family: "canton" };
|
58
|
+
case "tron":
|
59
|
+
return { family: "tron" };
|
60
|
+
case "ethereum":
|
61
|
+
return { family: "evm" };
|
62
|
+
case "sonic":
|
63
|
+
return { family: "evm" };
|
64
|
+
default:
|
65
|
+
return undefined;
|
66
|
+
}
|
67
|
+
});
|
48
68
|
(config.getCurrencyConfiguration as jest.Mock).mockReturnValue({ config: true });
|
49
69
|
|
50
70
|
// API mocks
|
@@ -52,21 +72,29 @@ describe("getAlpacaApi", () => {
|
|
52
72
|
jest.spyOn(stellarModule, "createApi").mockReturnValue(mockApiInstance as any);
|
53
73
|
jest.spyOn(cantonModule, "createApi").mockReturnValue(mockApiInstance as any);
|
54
74
|
jest.spyOn(tronModule, "createApi").mockReturnValue(mockApiInstance as any);
|
75
|
+
jest.spyOn(evmModule, "createApi").mockReturnValue(mockApiInstance as any);
|
55
76
|
jest.spyOn(networkApi, "getNetworkAlpacaApi").mockReturnValue(mockApiInstance as any);
|
56
77
|
});
|
57
78
|
|
58
79
|
const testCases = [
|
59
|
-
{ network: "xrp", module: xrpModule, label: "XRP" },
|
60
|
-
{ network: "stellar", module: stellarModule, label: "Stellar" },
|
61
|
-
{ network: "tron", module: tronModule, label: "Tron" },
|
62
|
-
{ network: "canton", module: cantonModule, label: "Canton" },
|
80
|
+
{ network: "xrp", module: xrpModule, label: "XRP", params: [{ config: true }] },
|
81
|
+
{ network: "stellar", module: stellarModule, label: "Stellar", params: [{ config: true }] },
|
82
|
+
{ network: "tron", module: tronModule, label: "Tron", params: [{ config: true }] },
|
83
|
+
{ network: "canton", module: cantonModule, label: "Canton", params: [{ config: true }] },
|
84
|
+
{
|
85
|
+
network: "ethereum",
|
86
|
+
module: evmModule,
|
87
|
+
label: "Ethereum",
|
88
|
+
params: [{ config: true }, "ethereum"],
|
89
|
+
},
|
90
|
+
{ network: "sonic", module: evmModule, label: "Sonic", params: [{ config: true }, "sonic"] },
|
63
91
|
];
|
64
92
|
|
65
|
-
testCases.forEach(({ network, module, label }) => {
|
93
|
+
testCases.forEach(({ network, module, label, params }) => {
|
66
94
|
it(`should return ${label} API for network "${network}" and kind "local"`, () => {
|
67
95
|
const result = getAlpacaApi(network, "local");
|
68
96
|
expect(result).toEqual(mockApiInstance);
|
69
|
-
expect(module.createApi).toHaveBeenCalledWith(
|
97
|
+
expect(module.createApi).toHaveBeenCalledWith(...params);
|
70
98
|
});
|
71
99
|
});
|
72
100
|
|
@@ -19,7 +19,7 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
|
|
19
19
|
feeCustomUnit?: Unit | null | undefined;
|
20
20
|
memoType?: string | null;
|
21
21
|
memoValue?: string | null;
|
22
|
-
mode?: "send" | "changeTrust";
|
22
|
+
mode?: "send" | "changeTrust" | "send-legacy" | "send-eip1559";
|
23
23
|
assetReference?: string;
|
24
24
|
assetOwner?: string;
|
25
25
|
networkInfo?: NetworkInfo | null;
|
@@ -51,6 +51,14 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
|
|
51
51
|
assetOwner: "",
|
52
52
|
networkInfo: null,
|
53
53
|
};
|
54
|
+
case "evm": {
|
55
|
+
return {
|
56
|
+
mode: "send-eip1559",
|
57
|
+
family: currency.family,
|
58
|
+
amount: new BigNumber(0),
|
59
|
+
recipient: "",
|
60
|
+
};
|
61
|
+
}
|
54
62
|
default:
|
55
63
|
throw new Error(`Unsupported currency family: ${currency.family}`);
|
56
64
|
}
|
@@ -2,8 +2,14 @@ import { makeScanAccounts } from "@ledgerhq/coin-framework/bridge/jsHelpers";
|
|
2
2
|
import { CurrencyBridge } from "@ledgerhq/types-live";
|
3
3
|
import { genericGetAccountShape } from "./getAccountShape";
|
4
4
|
import { getSigner } from "./signer";
|
5
|
+
import type { AlpacaSigner } from "./signer/types";
|
5
6
|
|
6
|
-
export function getAlpacaCurrencyBridge(
|
7
|
+
export function getAlpacaCurrencyBridge(
|
8
|
+
network: string,
|
9
|
+
kind: string,
|
10
|
+
customSigner?: AlpacaSigner,
|
11
|
+
): CurrencyBridge {
|
12
|
+
const signer = customSigner ?? getSigner(network);
|
7
13
|
return {
|
8
14
|
preload: () => Promise.resolve({}),
|
9
15
|
hydrate: () => {
|
@@ -11,7 +17,7 @@ export function getAlpacaCurrencyBridge(network: string, kind: string): Currency
|
|
11
17
|
},
|
12
18
|
scanAccounts: makeScanAccounts({
|
13
19
|
getAccountShape: genericGetAccountShape(network, kind),
|
14
|
-
getAddressFn:
|
20
|
+
getAddressFn: signer.getAddress.bind(signer),
|
15
21
|
}),
|
16
22
|
};
|
17
23
|
}
|
@@ -73,7 +73,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
73
73
|
getTokenFromAsset: alpacaApi.getTokenFromAsset,
|
74
74
|
}) || [];
|
75
75
|
|
76
|
-
const
|
76
|
+
const operations = mergedOps.map(op => {
|
77
77
|
const subOperations = inferSubOperations(op.hash, subAccounts);
|
78
78
|
|
79
79
|
return {
|
@@ -85,13 +85,12 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
85
85
|
const res = {
|
86
86
|
id: accountId,
|
87
87
|
xpub: address,
|
88
|
-
blockHeight:
|
89
|
-
operationsWithSubs.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
88
|
+
blockHeight: operations.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
90
89
|
balance: new BigNumber(nativeBalance.toString()),
|
91
90
|
spendableBalance: new BigNumber(spendableBalance.toString()),
|
92
|
-
operations
|
91
|
+
operations,
|
93
92
|
subAccounts,
|
94
|
-
operationsCount:
|
93
|
+
operationsCount: operations.length,
|
95
94
|
};
|
96
95
|
return res;
|
97
96
|
};
|