@ledgerhq/live-common 34.53.0-nightly.20251120023735 → 34.53.0
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/bridge.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/bridge.js +4 -0
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/__tests__/test-helpers/environment.js +0 -3
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +10 -12
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/currencies/helpers.d.ts +3 -1
- package/lib/currencies/helpers.d.ts.map +1 -1
- package/lib/currencies/helpers.js +27 -1
- package/lib/currencies/helpers.js.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts +0 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.js +0 -1
- package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib/deposit/helper.d.ts +8 -0
- package/lib/deposit/helper.d.ts.map +1 -0
- package/lib/deposit/helper.js +125 -0
- package/lib/deposit/helper.js.map +1 -0
- package/lib/deposit/index.d.ts +3 -0
- package/lib/deposit/index.d.ts.map +1 -0
- package/lib/deposit/index.js +6 -0
- package/lib/deposit/index.js.map +1 -0
- package/lib/deposit/mock.d.ts +75 -0
- package/lib/deposit/mock.d.ts.map +1 -0
- package/lib/deposit/mock.js +15111 -0
- package/lib/deposit/mock.js.map +1 -0
- package/lib/deposit/type.d.ts +17 -0
- package/lib/deposit/type.d.ts.map +1 -1
- package/lib/deposit/type.js.map +1 -1
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts +3 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js +40 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -0
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts +1 -2
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useBatteryStatuses.js +2 -4
- package/lib/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib/deviceSDK/tasks/core.d.ts +1 -1
- package/lib/deviceSDK/tasks/core.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/core.js +1 -1
- package/lib/deviceSDK/tasks/core.js.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.js +0 -2
- package/lib/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- 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/updateFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/updateFirmware.js +0 -1
- package/lib/deviceSDK/tasks/updateFirmware.js.map +1 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +3 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +1 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js +26 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +1 -0
- package/lib/e2e/enum/Account.d.ts +1 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +1 -0
- package/lib/e2e/enum/Account.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 +6 -2
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/families/algorand.d.ts +1 -1
- package/lib/e2e/families/algorand.d.ts.map +1 -1
- package/lib/e2e/families/algorand.js +5 -5
- package/lib/e2e/families/algorand.js.map +1 -1
- package/lib/e2e/families/aptos.d.ts +2 -2
- package/lib/e2e/families/aptos.d.ts.map +1 -1
- package/lib/e2e/families/aptos.js +9 -9
- package/lib/e2e/families/aptos.js.map +1 -1
- package/lib/e2e/families/bitcoin.d.ts +2 -2
- package/lib/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib/e2e/families/bitcoin.js +11 -11
- package/lib/e2e/families/bitcoin.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts +0 -6
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +26 -28
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/celo.d.ts +1 -1
- package/lib/e2e/families/celo.d.ts.map +1 -1
- package/lib/e2e/families/celo.js +5 -5
- package/lib/e2e/families/celo.js.map +1 -1
- package/lib/e2e/families/cosmos.d.ts +2 -2
- package/lib/e2e/families/cosmos.d.ts.map +1 -1
- package/lib/e2e/families/cosmos.js +9 -9
- package/lib/e2e/families/cosmos.js.map +1 -1
- package/lib/e2e/families/evm.d.ts +0 -2
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +12 -13
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/hedera.d.ts +1 -1
- package/lib/e2e/families/hedera.d.ts.map +1 -1
- package/lib/e2e/families/hedera.js +5 -5
- package/lib/e2e/families/hedera.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +2 -2
- package/lib/e2e/families/kaspa.d.ts.map +1 -1
- package/lib/e2e/families/kaspa.js +9 -9
- package/lib/e2e/families/kaspa.js.map +1 -1
- package/lib/e2e/families/multiversX.d.ts +1 -1
- package/lib/e2e/families/multiversX.d.ts.map +1 -1
- package/lib/e2e/families/multiversX.js +5 -5
- package/lib/e2e/families/multiversX.js.map +1 -1
- package/lib/e2e/families/near.d.ts +1 -1
- package/lib/e2e/families/near.d.ts.map +1 -1
- package/lib/e2e/families/near.js +6 -6
- package/lib/e2e/families/near.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts +1 -1
- package/lib/e2e/families/osmosis.d.ts.map +1 -1
- package/lib/e2e/families/osmosis.js +5 -5
- package/lib/e2e/families/osmosis.js.map +1 -1
- package/lib/e2e/families/polkadot.d.ts +1 -1
- package/lib/e2e/families/polkadot.d.ts.map +1 -1
- package/lib/e2e/families/polkadot.js +5 -5
- package/lib/e2e/families/polkadot.js.map +1 -1
- package/lib/e2e/families/solana.d.ts +2 -2
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +9 -9
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/families/stellar.d.ts +1 -1
- package/lib/e2e/families/stellar.d.ts.map +1 -1
- package/lib/e2e/families/stellar.js +5 -5
- package/lib/e2e/families/stellar.js.map +1 -1
- package/lib/e2e/families/sui.d.ts +1 -1
- package/lib/e2e/families/sui.d.ts.map +1 -1
- package/lib/e2e/families/sui.js +5 -5
- package/lib/e2e/families/sui.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +8 -7
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/families/tron.d.ts +1 -1
- package/lib/e2e/families/tron.d.ts.map +1 -1
- package/lib/e2e/families/tron.js +5 -5
- package/lib/e2e/families/tron.js.map +1 -1
- package/lib/e2e/families/xrp.d.ts +1 -1
- package/lib/e2e/families/xrp.d.ts.map +1 -1
- package/lib/e2e/families/xrp.js +5 -5
- package/lib/e2e/families/xrp.js.map +1 -1
- package/lib/e2e/index.d.ts +0 -15
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +11 -11
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +78 -78
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/providers/swap.d.ts +0 -1
- package/lib/exchange/providers/swap.d.ts.map +1 -1
- package/lib/exchange/providers/swap.js +1 -5
- package/lib/exchange/providers/swap.js.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js +3 -2
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.js +10 -15
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
- package/lib/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib/families/canton/bridge/mock.js +0 -1
- package/lib/families/canton/bridge/mock.js.map +1 -1
- package/lib/families/evm/config.d.ts.map +1 -1
- package/lib/families/evm/config.js +0 -49
- package/lib/families/evm/config.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts +0 -3
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +0 -6
- 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/market/hooks/useMarketDataProvider.js +0 -1
- package/lib/market/hooks/useMarketDataProvider.js.map +1 -1
- package/lib/market/utils/types.d.ts +0 -1
- package/lib/market/utils/types.d.ts.map +1 -1
- package/lib/market/utils/types.js.map +1 -1
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +22 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +1 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +41 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -11
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts +5 -1
- 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 +2 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/currencyUtils.d.ts +10 -0
- package/lib/modularDrawer/utils/currencyUtils.d.ts.map +1 -0
- package/lib/modularDrawer/utils/currencyUtils.js +74 -0
- package/lib/modularDrawer/utils/currencyUtils.js.map +1 -0
- package/lib/modularDrawer/utils/{groupCurrenciesByAsset.d.ts → groupCurrenciesByProvider.d.ts} +2 -2
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +1 -0
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.js +21 -0
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.js.map +1 -0
- package/lib/modularDrawer/utils/index.d.ts +1 -1
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +3 -3
- package/lib/modularDrawer/utils/index.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +5 -0
- package/lib/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib/platform/filters.d.ts +2 -1
- package/lib/platform/filters.d.ts.map +1 -1
- package/lib/platform/filters.js +17 -1
- package/lib/platform/filters.js.map +1 -1
- package/lib/platform/helpers.d.ts +5 -1
- package/lib/platform/helpers.d.ts.map +1 -1
- package/lib/platform/helpers.js +33 -1
- package/lib/platform/helpers.js.map +1 -1
- package/lib/platform/react.d.ts +3 -2
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +16 -66
- 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/postOnboarding/reducer.d.ts +0 -2
- package/lib/postOnboarding/reducer.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 +3 -2
- 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 +4 -5
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/converters.d.ts +0 -1
- package/lib/wallet-api/converters.d.ts.map +1 -1
- package/lib/wallet-api/converters.js +2 -7
- package/lib/wallet-api/converters.js.map +1 -1
- package/lib/wallet-api/react.d.ts +11 -6
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +135 -293
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/tracking.d.ts +0 -6
- package/lib/wallet-api/tracking.d.ts.map +1 -1
- package/lib/wallet-api/tracking.js +0 -20
- package/lib/wallet-api/tracking.js.map +1 -1
- package/lib/wallet-api/types.d.ts +0 -3
- package/lib/wallet-api/types.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.js +80 -65
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts +0 -6
- package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
- package/lib/wallet-api/utils/deriveAccountIdForManifest.js +3 -13
- package/lib/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.d.ts.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js +4 -0
- package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +0 -3
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +11 -13
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/currencies/helpers.d.ts +3 -1
- package/lib-es/currencies/helpers.d.ts.map +1 -1
- package/lib-es/currencies/helpers.js +24 -0
- package/lib-es/currencies/helpers.js.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts +0 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.js +0 -1
- package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib-es/deposit/helper.d.ts +8 -0
- package/lib-es/deposit/helper.d.ts.map +1 -0
- package/lib-es/deposit/helper.js +117 -0
- package/lib-es/deposit/helper.js.map +1 -0
- package/lib-es/deposit/index.d.ts +3 -0
- package/lib-es/deposit/index.d.ts.map +1 -0
- package/lib-es/deposit/index.js +3 -0
- package/lib-es/deposit/index.js.map +1 -0
- package/lib-es/deposit/mock.d.ts +75 -0
- package/lib-es/deposit/mock.d.ts.map +1 -0
- package/lib-es/deposit/mock.js +15108 -0
- package/lib-es/deposit/mock.js.map +1 -0
- package/lib-es/deposit/type.d.ts +17 -0
- package/lib-es/deposit/type.d.ts.map +1 -1
- package/lib-es/deposit/type.js.map +1 -1
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts +3 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js +36 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -0
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts +1 -2
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js +2 -4
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib-es/deviceSDK/tasks/core.d.ts +1 -1
- package/lib-es/deviceSDK/tasks/core.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/core.js +1 -1
- package/lib-es/deviceSDK/tasks/core.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js +0 -2
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- 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/updateFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/updateFirmware.js +1 -2
- package/lib-es/deviceSDK/tasks/updateFirmware.js.map +1 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +3 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +1 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js +18 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +1 -0
- package/lib-es/e2e/enum/Account.d.ts +1 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +1 -0
- package/lib-es/e2e/enum/Account.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 +6 -2
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/families/algorand.d.ts +1 -1
- package/lib-es/e2e/families/algorand.d.ts.map +1 -1
- package/lib-es/e2e/families/algorand.js +4 -5
- package/lib-es/e2e/families/algorand.js.map +1 -1
- package/lib-es/e2e/families/aptos.d.ts +2 -2
- package/lib-es/e2e/families/aptos.d.ts.map +1 -1
- package/lib-es/e2e/families/aptos.js +7 -9
- package/lib-es/e2e/families/aptos.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.d.ts +2 -2
- package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +9 -11
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts +0 -6
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +21 -23
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/celo.d.ts +1 -1
- package/lib-es/e2e/families/celo.d.ts.map +1 -1
- package/lib-es/e2e/families/celo.js +4 -5
- package/lib-es/e2e/families/celo.js.map +1 -1
- package/lib-es/e2e/families/cosmos.d.ts +2 -2
- package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
- package/lib-es/e2e/families/cosmos.js +7 -9
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts +0 -2
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +9 -10
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/hedera.d.ts +1 -1
- package/lib-es/e2e/families/hedera.d.ts.map +1 -1
- package/lib-es/e2e/families/hedera.js +4 -5
- package/lib-es/e2e/families/hedera.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +2 -2
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -1
- package/lib-es/e2e/families/kaspa.js +7 -9
- package/lib-es/e2e/families/kaspa.js.map +1 -1
- package/lib-es/e2e/families/multiversX.d.ts +1 -1
- package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
- package/lib-es/e2e/families/multiversX.js +4 -5
- package/lib-es/e2e/families/multiversX.js.map +1 -1
- package/lib-es/e2e/families/near.d.ts +1 -1
- package/lib-es/e2e/families/near.d.ts.map +1 -1
- package/lib-es/e2e/families/near.js +5 -6
- package/lib-es/e2e/families/near.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts +1 -1
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
- package/lib-es/e2e/families/osmosis.js +4 -5
- package/lib-es/e2e/families/osmosis.js.map +1 -1
- package/lib-es/e2e/families/polkadot.d.ts +1 -1
- package/lib-es/e2e/families/polkadot.d.ts.map +1 -1
- package/lib-es/e2e/families/polkadot.js +4 -5
- package/lib-es/e2e/families/polkadot.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts +2 -2
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +7 -9
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/families/stellar.d.ts +1 -1
- package/lib-es/e2e/families/stellar.d.ts.map +1 -1
- package/lib-es/e2e/families/stellar.js +4 -5
- package/lib-es/e2e/families/stellar.js.map +1 -1
- package/lib-es/e2e/families/sui.d.ts +1 -1
- package/lib-es/e2e/families/sui.d.ts.map +1 -1
- package/lib-es/e2e/families/sui.js +4 -5
- package/lib-es/e2e/families/sui.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +8 -8
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/families/tron.d.ts +1 -1
- package/lib-es/e2e/families/tron.d.ts.map +1 -1
- package/lib-es/e2e/families/tron.js +4 -5
- package/lib-es/e2e/families/tron.js.map +1 -1
- package/lib-es/e2e/families/xrp.d.ts +1 -1
- package/lib-es/e2e/families/xrp.d.ts.map +1 -1
- package/lib-es/e2e/families/xrp.js +4 -5
- package/lib-es/e2e/families/xrp.js.map +1 -1
- package/lib-es/e2e/index.d.ts +0 -15
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +11 -11
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +43 -54
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/providers/swap.d.ts +0 -1
- package/lib-es/exchange/providers/swap.d.ts.map +1 -1
- package/lib-es/exchange/providers/swap.js +0 -3
- package/lib-es/exchange/providers/swap.js.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js +3 -2
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js +12 -17
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/canton/bridge/mock.js +0 -1
- package/lib-es/families/canton/bridge/mock.js.map +1 -1
- package/lib-es/families/evm/config.d.ts.map +1 -1
- package/lib-es/families/evm/config.js +0 -49
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts +0 -3
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +0 -6
- 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/market/hooks/useMarketDataProvider.js +0 -1
- package/lib-es/market/hooks/useMarketDataProvider.js.map +1 -1
- package/lib-es/market/utils/types.d.ts +0 -1
- package/lib-es/market/utils/types.d.ts.map +1 -1
- package/lib-es/market/utils/types.js.map +1 -1
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +22 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +1 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +38 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -11
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts +5 -1
- 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 +2 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/currencyUtils.d.ts +10 -0
- package/lib-es/modularDrawer/utils/currencyUtils.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/currencyUtils.js +65 -0
- package/lib-es/modularDrawer/utils/currencyUtils.js.map +1 -0
- package/lib-es/modularDrawer/utils/{groupCurrenciesByAsset.d.ts → groupCurrenciesByProvider.d.ts} +2 -2
- package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/{groupCurrenciesByAsset.js → groupCurrenciesByProvider.js} +6 -6
- package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.js.map +1 -0
- package/lib-es/modularDrawer/utils/index.d.ts +1 -1
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +1 -1
- package/lib-es/modularDrawer/utils/index.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +5 -0
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib-es/platform/filters.d.ts +2 -1
- package/lib-es/platform/filters.d.ts.map +1 -1
- package/lib-es/platform/filters.js +15 -0
- package/lib-es/platform/filters.js.map +1 -1
- package/lib-es/platform/helpers.d.ts +5 -1
- package/lib-es/platform/helpers.d.ts.map +1 -1
- package/lib-es/platform/helpers.js +30 -1
- package/lib-es/platform/helpers.js.map +1 -1
- package/lib-es/platform/react.d.ts +3 -2
- package/lib-es/platform/react.d.ts.map +1 -1
- package/lib-es/platform/react.js +16 -67
- 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/postOnboarding/reducer.d.ts +0 -2
- package/lib-es/postOnboarding/reducer.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 +3 -2
- 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 +4 -5
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/converters.d.ts +0 -1
- package/lib-es/wallet-api/converters.d.ts.map +1 -1
- package/lib-es/wallet-api/converters.js +1 -5
- package/lib-es/wallet-api/converters.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts +11 -6
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +131 -291
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/tracking.d.ts +0 -6
- package/lib-es/wallet-api/tracking.d.ts.map +1 -1
- package/lib-es/wallet-api/tracking.js +0 -20
- package/lib-es/wallet-api/tracking.js.map +1 -1
- package/lib-es/wallet-api/types.d.ts +0 -3
- package/lib-es/wallet-api/types.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +77 -62
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts +0 -6
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js +2 -11
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
- package/package.json +58 -59
- package/src/__tests__/migration/account-migration.ts +0 -3
- package/src/__tests__/test-helpers/bridge.ts +2 -0
- package/src/__tests__/test-helpers/environment.ts +0 -3
- package/src/bridge/generic-alpaca/getAccountShape.ts +12 -15
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +101 -142
- package/src/currencies/helpers.test.ts +20 -0
- package/src/currencies/helpers.ts +42 -1
- package/src/dada-client/hooks/useAssetsData.ts +0 -1
- package/src/deposit/deposit.integration.test.ts +88 -0
- package/src/deposit/deposit.test.ts +684 -0
- package/src/deposit/helper.ts +143 -0
- package/src/deposit/index.ts +3 -0
- package/src/deposit/mock.ts +15112 -0
- package/src/deposit/type.ts +21 -0
- package/src/deposit/useGroupedCurrenciesByProvider.hook.ts +46 -0
- package/src/deviceSDK/hooks/useBatteryStatuses.test.ts +1 -3
- package/src/deviceSDK/hooks/useBatteryStatuses.ts +1 -4
- package/src/deviceSDK/tasks/core.test.ts +0 -20
- package/src/deviceSDK/tasks/core.ts +1 -2
- package/src/deviceSDK/tasks/getDeviceInfo.ts +0 -2
- package/src/deviceSDK/tasks/getLatestFirmware.ts +4 -4
- package/src/deviceSDK/tasks/updateFirmware.ts +0 -2
- package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +23 -0
- package/src/e2e/enum/Account.ts +6 -0
- package/src/e2e/enum/Currency.ts +6 -2
- package/src/e2e/families/algorand.ts +13 -20
- package/src/e2e/families/aptos.ts +16 -28
- package/src/e2e/families/bitcoin.ts +39 -53
- package/src/e2e/families/cardano.ts +36 -47
- package/src/e2e/families/celo.ts +12 -18
- package/src/e2e/families/cosmos.ts +23 -35
- package/src/e2e/families/evm.ts +13 -24
- package/src/e2e/families/hedera.ts +4 -6
- package/src/e2e/families/kaspa.ts +16 -28
- package/src/e2e/families/multiversX.ts +10 -16
- package/src/e2e/families/near.ts +17 -23
- package/src/e2e/families/osmosis.ts +13 -19
- package/src/e2e/families/polkadot.ts +13 -19
- package/src/e2e/families/solana.ts +23 -35
- package/src/e2e/families/stellar.ts +13 -18
- package/src/e2e/families/sui.ts +9 -15
- package/src/e2e/families/tezos.ts +18 -25
- package/src/e2e/families/tron.ts +13 -19
- package/src/e2e/families/xrp.ts +13 -19
- package/src/e2e/speculos.ts +140 -168
- package/src/exchange/providers/swap.ts +0 -4
- package/src/exchange/swap/hooks/v5/useFetchCurrencyAll.ts +3 -2
- package/src/exchange/swap/hooks/v5/useFilteredProviders.ts +12 -37
- package/src/families/canton/bridge/mock.ts +0 -1
- package/src/families/evm/config.ts +0 -49
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +12 -84
- package/src/featureFlags/defaultFeatures.ts +0 -6
- package/src/market/hooks/useMarketDataProvider.ts +0 -1
- package/src/market/utils/types.ts +0 -1
- package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +49 -0
- package/src/modularDrawer/hooks/__test__/useAssetAccountCounts.test.ts +5 -0
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +0 -11
- package/src/modularDrawer/hooks/useNetworkAccountCounts.tsx +6 -1
- package/src/modularDrawer/modules/__test__/createAssetConfiguration.test.tsx +2 -2
- package/src/modularDrawer/modules/__test__/createNetworkConfiguration.test.ts +342 -0
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +2 -1
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +126 -0
- package/src/modularDrawer/utils/currencyUtils.ts +95 -0
- package/src/modularDrawer/utils/{groupCurrenciesByAsset.ts → groupCurrenciesByProvider.ts} +5 -5
- package/src/modularDrawer/utils/index.ts +1 -1
- package/src/modularDrawer/utils/type.ts +5 -0
- package/src/platform/filters.ts +23 -1
- package/src/platform/helpers.ts +49 -2
- package/src/platform/react.ts +22 -86
- package/src/platform/types.ts +1 -1
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +30 -0
- package/src/utils/getAccountTuplesForCurrency.ts +6 -1
- package/src/wallet-api/Exchange/server.test.ts +5 -0
- package/src/wallet-api/Exchange/server.ts +6 -7
- package/src/wallet-api/converters.ts +1 -6
- package/src/wallet-api/react.ts +137 -312
- package/src/wallet-api/tracking.ts +0 -22
- package/src/wallet-api/types.ts +0 -5
- package/src/wallet-api/useDappLogic.ts +106 -91
- package/src/wallet-api/utils/deriveAccountIdForManifest.ts +2 -14
- package/lib/device/use-cases/getDeviceHasBattery.d.ts +0 -2
- package/lib/device/use-cases/getDeviceHasBattery.d.ts.map +0 -1
- package/lib/device/use-cases/getDeviceHasBattery.js +0 -6
- package/lib/device/use-cases/getDeviceHasBattery.js.map +0 -1
- package/lib/e2e/deviceInteraction/DeviceController.d.ts +0 -41
- package/lib/e2e/deviceInteraction/DeviceController.d.ts.map +0 -1
- package/lib/e2e/deviceInteraction/DeviceController.js +0 -68
- package/lib/e2e/deviceInteraction/DeviceController.js.map +0 -1
- package/lib/e2e/enum/ReceiveFundsOptions.d.ts +0 -6
- package/lib/e2e/enum/ReceiveFundsOptions.d.ts.map +0 -1
- package/lib/e2e/enum/ReceiveFundsOptions.js +0 -8
- package/lib/e2e/enum/ReceiveFundsOptions.js.map +0 -1
- package/lib/families/canton/react.d.ts +0 -15
- package/lib/families/canton/react.d.ts.map +0 -1
- package/lib/families/canton/react.js +0 -14
- package/lib/families/canton/react.js.map +0 -1
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +0 -1
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.js +0 -21
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.js.map +0 -1
- package/lib-es/device/use-cases/getDeviceHasBattery.d.ts +0 -2
- package/lib-es/device/use-cases/getDeviceHasBattery.d.ts.map +0 -1
- package/lib-es/device/use-cases/getDeviceHasBattery.js +0 -2
- package/lib-es/device/use-cases/getDeviceHasBattery.js.map +0 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts +0 -41
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts.map +0 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.js +0 -63
- package/lib-es/e2e/deviceInteraction/DeviceController.js.map +0 -1
- package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts +0 -6
- package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts.map +0 -1
- package/lib-es/e2e/enum/ReceiveFundsOptions.js +0 -5
- package/lib-es/e2e/enum/ReceiveFundsOptions.js.map +0 -1
- package/lib-es/families/canton/react.d.ts +0 -15
- package/lib-es/families/canton/react.d.ts.map +0 -1
- package/lib-es/families/canton/react.js +0 -10
- package/lib-es/families/canton/react.js.map +0 -1
- package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.js.map +0 -1
- package/src/device/use-cases/getDeviceHasBattery.ts +0 -1
- package/src/e2e/deviceInteraction/DeviceController.ts +0 -85
- package/src/e2e/enum/ReceiveFundsOptions.ts +0 -7
- package/src/families/canton/react.ts +0 -50
- package/src/modularDrawer/utils/__tests__/groupCurrenciesByAsset.test.ts +0 -88
|
@@ -2,44 +2,32 @@ import expect from "expect";
|
|
|
2
2
|
import { Delegate } from "../models/Delegate";
|
|
3
3
|
import { Transaction } from "../models/Transaction";
|
|
4
4
|
import { containsSubstringInEvent, getDelegateEvents, getSendEvents } from "../speculos";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
7
8
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
8
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export async function delegateCosmos(delegatingAccount: Delegate) {
|
|
11
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
12
|
+
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
|
13
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
14
|
+
if (isTouchDevice()) {
|
|
15
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
16
|
+
} else {
|
|
17
|
+
await pressBoth();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
export async function sendCosmos(tx: Transaction) {
|
|
22
|
+
const events = await getSendEvents(tx);
|
|
23
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
24
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
25
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
26
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export const sendCosmos = withDeviceController(
|
|
28
|
-
({ getButtonsController }) =>
|
|
29
|
-
async (tx: Transaction) => {
|
|
30
|
-
const buttons = getButtonsController();
|
|
31
|
-
|
|
32
|
-
const events = await getSendEvents(tx);
|
|
33
|
-
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
34
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
35
|
-
|
|
36
|
-
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
37
|
-
expect(isAddressCorrect).toBeTruthy();
|
|
38
|
-
|
|
39
|
-
if (isTouchDevice()) {
|
|
40
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
41
|
-
} else {
|
|
42
|
-
await buttons.both();
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
);
|
|
28
|
+
if (isTouchDevice()) {
|
|
29
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
30
|
+
} else {
|
|
31
|
+
await pressBoth();
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/e2e/families/evm.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import expect from "expect";
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { containsSubstringInEvent, pressUntilTextFound } from "../speculos";
|
|
4
|
-
import { getSpeculosModel
|
|
4
|
+
import { getSpeculosModel } from "../speculosAppVersion";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
6
7
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
8
|
import { Device } from "../enum/Device";
|
|
8
9
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
9
|
-
import {
|
|
10
|
+
import { isTouchDevice } from "../speculosAppVersion";
|
|
10
11
|
|
|
11
12
|
function validateTransactionData(tx: Transaction, events: string[]) {
|
|
12
13
|
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
13
14
|
expect(isAmountCorrect).toBeTruthy();
|
|
14
|
-
|
|
15
15
|
if (tx.accountToCredit.ensName && process.env.SPECULOS_DEVICE !== Device.LNS.name) {
|
|
16
16
|
const isENSNameCorrect = containsSubstringInEvent(tx.accountToCredit.ensName, events);
|
|
17
17
|
expect(isENSNameCorrect).toBeTruthy();
|
|
@@ -27,31 +27,20 @@ async function sendEvmTouchDevices(tx: Transaction) {
|
|
|
27
27
|
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
|
|
36
|
-
validateTransactionData(tx, events);
|
|
37
|
-
await buttons.both();
|
|
38
|
-
},
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export const sendEvmNanoS = withDeviceController(
|
|
42
|
-
({ getButtonsController }) =>
|
|
43
|
-
async (tx: Transaction) => {
|
|
44
|
-
const buttons = getButtonsController();
|
|
30
|
+
async function sendEvmButtonDevice(tx: Transaction) {
|
|
31
|
+
const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
|
|
32
|
+
validateTransactionData(tx, events);
|
|
33
|
+
await pressBoth();
|
|
34
|
+
}
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
async function sendEvmNanoS(tx: Transaction) {
|
|
37
|
+
const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
|
|
38
|
+
validateTransactionData(tx, events);
|
|
39
|
+
await pressBoth();
|
|
40
|
+
}
|
|
51
41
|
|
|
52
42
|
export async function sendEVM(tx: Transaction) {
|
|
53
43
|
const speculosModel = getSpeculosModel();
|
|
54
|
-
|
|
55
44
|
if (isTouchDevice()) {
|
|
56
45
|
return sendEvmTouchDevices(tx);
|
|
57
46
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
1
2
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
2
3
|
import { pressUntilTextFound } from "../speculos";
|
|
3
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
4
|
-
|
|
5
|
-
export const sendHedera = withDeviceController(({ getButtonsController }) => async () => {
|
|
6
|
-
const buttons = getButtonsController();
|
|
7
4
|
|
|
5
|
+
export async function sendHedera() {
|
|
8
6
|
await pressUntilTextFound(DeviceLabels.APPROVE);
|
|
9
|
-
await
|
|
10
|
-
}
|
|
7
|
+
await pressBoth();
|
|
8
|
+
}
|
|
@@ -1,37 +1,25 @@
|
|
|
1
1
|
import expect from "expect";
|
|
2
2
|
import { waitFor, containsSubstringInEvent, pressUntilTextFound, getSendEvents } from "../speculos";
|
|
3
3
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
4
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
4
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
5
6
|
import { Delegate } from "../models/Delegate";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
8
|
import { Transaction } from "../models/Transaction";
|
|
8
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
(
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export async function sendKaspa(tx: Transaction) {
|
|
11
|
+
await getSendEvents(tx);
|
|
12
|
+
if (isTouchDevice()) {
|
|
13
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
14
|
+
} else {
|
|
15
|
+
await pressBoth();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export const delegateKaspa = withDeviceController(
|
|
26
|
-
({ getButtonsController }) =>
|
|
27
|
-
async (delegatingAccount: Delegate) => {
|
|
28
|
-
const buttons = getButtonsController();
|
|
29
|
-
|
|
30
|
-
await waitFor(DeviceLabels.REVIEW_OPERATION);
|
|
31
|
-
const events = await pressUntilTextFound(DeviceLabels.APPROVE);
|
|
32
|
-
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
|
33
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
34
|
-
|
|
35
|
-
await buttons.both();
|
|
36
|
-
},
|
|
37
|
-
);
|
|
19
|
+
export async function delegateKaspa(delegatingAccount: Delegate) {
|
|
20
|
+
await waitFor(DeviceLabels.REVIEW_OPERATION);
|
|
21
|
+
const events = await pressUntilTextFound(DeviceLabels.APPROVE);
|
|
22
|
+
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
|
23
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
24
|
+
await pressBoth();
|
|
25
|
+
}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { getDelegateEvents, pressUntilTextFound } from "../speculos";
|
|
2
2
|
import { Delegate } from "../models/Delegate";
|
|
3
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
3
4
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
4
5
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
5
6
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
6
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
-
} else {
|
|
19
|
-
await buttons.both();
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
);
|
|
8
|
+
export async function delegateMultiversX(delegatingAccount: Delegate) {
|
|
9
|
+
await getDelegateEvents(delegatingAccount);
|
|
10
|
+
if (isTouchDevice()) {
|
|
11
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
12
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
13
|
+
} else {
|
|
14
|
+
await pressBoth();
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/e2e/families/near.ts
CHANGED
|
@@ -7,29 +7,23 @@ import {
|
|
|
7
7
|
pressUntilTextFound,
|
|
8
8
|
} from "../speculos";
|
|
9
9
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
10
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
10
11
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
11
12
|
import { longPressAndRelease, pressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
12
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
13
13
|
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
await waitFor(DeviceLabels.VIEW_ACTION);
|
|
31
|
-
await pressUntilTextFound(DeviceLabels.SIGN);
|
|
32
|
-
await buttons.both();
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
);
|
|
14
|
+
export async function delegateNear(delegatingAccount: Delegate) {
|
|
15
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
16
|
+
const isProviderCorrect = containsSubstringInEvent(delegatingAccount.provider, events);
|
|
17
|
+
expect(isProviderCorrect).toBeTruthy();
|
|
18
|
+
if (isTouchDevice()) {
|
|
19
|
+
await pressAndRelease(DeviceLabels.CONFIRM_HEADER);
|
|
20
|
+
await waitFor(DeviceLabels.VIEW_ACTION);
|
|
21
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
22
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
23
|
+
} else {
|
|
24
|
+
await pressBoth();
|
|
25
|
+
await waitFor(DeviceLabels.VIEW_ACTION);
|
|
26
|
+
await pressUntilTextFound(DeviceLabels.SIGN);
|
|
27
|
+
await pressBoth();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -2,25 +2,19 @@ import { Delegate } from "../models/Delegate";
|
|
|
2
2
|
import { pressUntilTextFound, containsSubstringInEvent, getDelegateEvents } from "../speculos";
|
|
3
3
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
4
4
|
import expect from "expect";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
22
|
-
} else {
|
|
23
|
-
await buttons.both();
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
);
|
|
9
|
+
export async function delegateOsmosis(delegatingAccount: Delegate) {
|
|
10
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
11
|
+
const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
|
|
12
|
+
const isAmountCorrect = containsSubstringInEvent(amountInUosmo, events);
|
|
13
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
14
|
+
if (isTouchDevice()) {
|
|
15
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
16
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
17
|
+
} else {
|
|
18
|
+
await pressBoth();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -2,26 +2,20 @@ import expect from "expect";
|
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { containsSubstringInEvent, getSendEvents } from "../speculos";
|
|
4
4
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export async function sendPolkadot(tx: Transaction) {
|
|
10
|
+
const events = await getSendEvents(tx);
|
|
11
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
12
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
13
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
14
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (isTouchDevice()) {
|
|
22
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
23
|
-
} else {
|
|
24
|
-
await buttons.both();
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
);
|
|
16
|
+
if (isTouchDevice()) {
|
|
17
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
+
} else {
|
|
19
|
+
await pressBoth();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -2,45 +2,33 @@ import expect from "expect";
|
|
|
2
2
|
import { containsSubstringInEvent, getDelegateEvents, getSendEvents } from "../speculos";
|
|
3
3
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
4
4
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { Device } from "../enum/Device";
|
|
7
8
|
import { Transaction } from "../models/Transaction";
|
|
8
9
|
import { Delegate } from "../models/Delegate";
|
|
9
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export async function delegateSolana(delegatingAccount: Delegate) {
|
|
12
|
+
await getDelegateEvents(delegatingAccount);
|
|
13
|
+
if (isTouchDevice()) {
|
|
14
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
15
|
+
} else {
|
|
16
|
+
await pressBoth();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
export async function sendSolana(tx: Transaction) {
|
|
21
|
+
const events = await getSendEvents(tx);
|
|
22
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
23
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
24
|
+
if (process.env.SPECULOS_DEVICE !== Device.LNS.name) {
|
|
25
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
26
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
27
|
+
}
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
export const sendSolana = withDeviceController(
|
|
27
|
-
({ getButtonsController }) =>
|
|
28
|
-
async (tx: Transaction) => {
|
|
29
|
-
const buttons = getButtonsController();
|
|
30
|
-
|
|
31
|
-
const events = await getSendEvents(tx);
|
|
32
|
-
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
33
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
34
|
-
|
|
35
|
-
if (process.env.SPECULOS_DEVICE !== Device.LNS.name) {
|
|
36
|
-
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
37
|
-
expect(isAddressCorrect).toBeTruthy();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (isTouchDevice()) {
|
|
41
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
42
|
-
} else {
|
|
43
|
-
await buttons.both();
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
);
|
|
29
|
+
if (isTouchDevice()) {
|
|
30
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
31
|
+
} else {
|
|
32
|
+
await pressBoth();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -2,26 +2,21 @@ import expect from "expect";
|
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { containsSubstringInEvent, getSendEvents } from "../speculos";
|
|
4
4
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export async function sendStellar(tx: Transaction) {
|
|
10
|
+
const events = await getSendEvents(tx);
|
|
11
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
12
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
14
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
15
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
await buttons.both();
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
);
|
|
17
|
+
if (isTouchDevice()) {
|
|
18
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
19
|
+
} else {
|
|
20
|
+
await pressBoth();
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/e2e/families/sui.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { getSendEvents } from "../speculos";
|
|
2
2
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
3
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
3
4
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
4
5
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
5
6
|
import { Transaction } from "../models/Transaction";
|
|
6
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
17
|
-
} else {
|
|
18
|
-
await buttons.both();
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
);
|
|
8
|
+
export async function sendSui(tx: Transaction) {
|
|
9
|
+
await getSendEvents(tx);
|
|
10
|
+
if (isTouchDevice()) {
|
|
11
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
12
|
+
} else {
|
|
13
|
+
await pressBoth();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
import { getDelegateEvents, getDeviceLabels, pressUntilTextFound } from "../speculos";
|
|
2
|
-
import { isTouchDevice
|
|
2
|
+
import { isTouchDevice } from "../speculosAppVersion";
|
|
3
3
|
import { Delegate } from "../models/Delegate";
|
|
4
4
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
5
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import {
|
|
8
|
+
import { getSpeculosModel } from "../speculosAppVersion";
|
|
8
9
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
async (delegatingAccount: Delegate) => {
|
|
12
|
-
const buttons = getButtonsController();
|
|
10
|
+
export async function delegateTezos(delegatingAccount: Delegate) {
|
|
11
|
+
const { delegateConfirmLabel } = getDeviceLabels(delegatingAccount.account.currency.speculosApp);
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
await getDelegateEvents(delegatingAccount);
|
|
14
|
+
await pressUntilTextFound(delegateConfirmLabel);
|
|
15
|
+
if (isTouchDevice()) {
|
|
16
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
17
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
+
} else {
|
|
19
|
+
await pressBoth();
|
|
20
|
+
}
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
24
|
-
} else {
|
|
25
|
-
await buttons.both();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (getSpeculosModel() === DeviceModelId.nanoS) {
|
|
29
|
-
await pressUntilTextFound(DeviceLabels.ACCEPT_AND_SEND);
|
|
30
|
-
await buttons.both();
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
);
|
|
22
|
+
if (getSpeculosModel() == DeviceModelId.nanoS) {
|
|
23
|
+
await pressUntilTextFound(DeviceLabels.ACCEPT_AND_SEND);
|
|
24
|
+
await pressBoth();
|
|
25
|
+
}
|
|
26
|
+
}
|
package/src/e2e/families/tron.ts
CHANGED
|
@@ -2,26 +2,20 @@ import expect from "expect";
|
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { containsSubstringInEvent, getSendEvents } from "../speculos";
|
|
4
4
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export async function sendTron(tx: Transaction) {
|
|
10
|
+
const events = await getSendEvents(tx);
|
|
11
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
12
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
13
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
14
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (isTouchDevice()) {
|
|
22
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
23
|
-
} else {
|
|
24
|
-
await buttons.both();
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
);
|
|
16
|
+
if (isTouchDevice()) {
|
|
17
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
+
} else {
|
|
19
|
+
await pressBoth();
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/e2e/families/xrp.ts
CHANGED
|
@@ -2,26 +2,20 @@ import expect from "expect";
|
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { containsSubstringInEvent, getSendEvents } from "../speculos";
|
|
4
4
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
5
|
+
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
5
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
-
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export async function sendXRP(tx: Transaction) {
|
|
10
|
+
const events = await getSendEvents(tx);
|
|
11
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
12
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
13
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
14
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (isTouchDevice()) {
|
|
22
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
23
|
-
} else {
|
|
24
|
-
await buttons.both();
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
);
|
|
16
|
+
if (isTouchDevice()) {
|
|
17
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
+
} else {
|
|
19
|
+
await pressBoth();
|
|
20
|
+
}
|
|
21
|
+
}
|