@ledgerhq/live-common 34.53.0-nightly.20251119110540 → 34.53.0-nightly.20251120135143
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/setup.integration.d.ts +2 -0
- package/lib/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
- package/lib/__tests__/test-helpers/{setup.js → setup.integration.js} +4 -8
- package/lib/__tests__/test-helpers/setup.integration.js.map +1 -0
- package/lib/account/helpers.js +17 -17
- package/lib/account/helpers.js.map +1 -1
- package/lib/bridge/impl.d.ts +0 -2
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +4 -8
- package/lib/bridge/impl.js.map +1 -1
- package/lib/currencies/index.d.ts +1 -1
- package/lib/currencies/index.d.ts.map +1 -1
- package/lib/currencies/index.js +1 -4
- package/lib/currencies/index.js.map +1 -1
- package/lib/e2e/deviceInteraction/DeviceController.d.ts +41 -0
- package/lib/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
- package/lib/e2e/deviceInteraction/DeviceController.js +68 -0
- package/lib/e2e/deviceInteraction/DeviceController.js.map +1 -0
- 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 +6 -0
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +28 -26
- 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 +2 -0
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +13 -12
- 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 +7 -8
- 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 +9 -0
- 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/swap/getCompleteSwapHistory.js +2 -2
- package/lib/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js +2 -2
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib/families/canton/bridge/mock.js +1 -0
- package/lib/families/canton/bridge/mock.js.map +1 -1
- package/lib/families/canton/react.d.ts +15 -0
- package/lib/families/canton/react.d.ts.map +1 -0
- package/lib/families/canton/react.js +14 -0
- package/lib/families/canton/react.js.map +1 -0
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
- package/lib/families/evm/setup.d.ts.map +1 -1
- package/lib/families/evm/setup.js +1 -11
- package/lib/families/evm/setup.js.map +1 -1
- package/lib/families/solana/setup.d.ts +8 -0
- package/lib/families/solana/setup.d.ts.map +1 -1
- package/lib/families/solana/setup.js +29 -16
- package/lib/families/solana/setup.js.map +1 -1
- package/lib/families/tron/data.mock.d.ts.map +1 -1
- package/lib/families/tron/data.mock.js +3 -6
- package/lib/families/tron/data.mock.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +3 -0
- 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/test-helpers/cryptoAssetsStore.d.ts +2 -0
- package/lib/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
- package/lib/test-helpers/cryptoAssetsStore.js +8 -0
- package/lib/test-helpers/cryptoAssetsStore.js.map +1 -0
- package/lib/wallet-api/ACRE/server.js +5 -5
- package/lib/wallet-api/ACRE/server.js.map +1 -1
- package/lib/wallet-api/Exchange/server.js +4 -4
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/logic.js +8 -8
- package/lib/wallet-api/logic.js.map +1 -1
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +4 -2
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/useDappLogic.js +2 -2
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/__tests__/test-helpers/setup.integration.d.ts +2 -0
- package/lib-es/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
- package/lib-es/__tests__/test-helpers/setup.integration.js +14 -0
- package/lib-es/__tests__/test-helpers/setup.integration.js.map +1 -0
- package/lib-es/account/helpers.js +1 -1
- package/lib-es/account/helpers.js.map +1 -1
- package/lib-es/bridge/impl.d.ts +0 -2
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/bridge/impl.js +3 -6
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/currencies/index.d.ts +1 -1
- package/lib-es/currencies/index.d.ts.map +1 -1
- package/lib-es/currencies/index.js +1 -1
- package/lib-es/currencies/index.js.map +1 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts +41 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.js +63 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.js.map +1 -0
- 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 +5 -4
- 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 +9 -7
- 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 +11 -9
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts +6 -0
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +23 -21
- 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 +5 -4
- 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 +9 -7
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts +2 -0
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +10 -9
- 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 +5 -4
- 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 +9 -7
- 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 +5 -4
- 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 +6 -5
- 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 +5 -4
- 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 +5 -4
- 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 +9 -7
- 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 +5 -4
- 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 +5 -4
- 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 +5 -4
- 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 +5 -4
- package/lib-es/e2e/families/xrp.js.map +1 -1
- package/lib-es/e2e/index.d.ts +9 -0
- 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 +54 -43
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.js +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/canton/bridge/mock.js +1 -0
- package/lib-es/families/canton/bridge/mock.js.map +1 -1
- package/lib-es/families/canton/react.d.ts +15 -0
- package/lib-es/families/canton/react.d.ts.map +1 -0
- package/lib-es/families/canton/react.js +10 -0
- package/lib-es/families/canton/react.js.map +1 -0
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
- package/lib-es/families/evm/setup.d.ts.map +1 -1
- package/lib-es/families/evm/setup.js +1 -11
- package/lib-es/families/evm/setup.js.map +1 -1
- package/lib-es/families/solana/setup.d.ts +8 -0
- package/lib-es/families/solana/setup.d.ts.map +1 -1
- package/lib-es/families/solana/setup.js +28 -17
- package/lib-es/families/solana/setup.js.map +1 -1
- package/lib-es/families/tron/data.mock.d.ts.map +1 -1
- package/lib-es/families/tron/data.mock.js +3 -6
- package/lib-es/families/tron/data.mock.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +3 -0
- 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/test-helpers/cryptoAssetsStore.d.ts +2 -0
- package/lib-es/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
- package/lib-es/test-helpers/cryptoAssetsStore.js +2 -0
- package/lib-es/test-helpers/cryptoAssetsStore.js.map +1 -0
- package/lib-es/wallet-api/ACRE/server.js +1 -1
- package/lib-es/wallet-api/ACRE/server.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +1 -1
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/logic.js +1 -1
- package/lib-es/wallet-api/logic.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +3 -1
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +1 -1
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/package.json +67 -53
- package/src/DataModel.test.ts +2 -8
- package/src/__tests__/__snapshots__/csvExport.ts.snap +0 -718
- package/src/__tests__/accounts/groupPerDay.ts +2 -4
- package/src/__tests__/csvExport.ts +3 -3
- package/src/__tests__/currencies.ts +0 -38
- package/src/__tests__/test-helpers/setup.integration.ts +17 -0
- package/src/__tests__/test-helpers/setup.ts +3 -8
- package/src/account/helpers.test.ts +2 -2
- package/src/account/helpers.ts +1 -1
- package/src/account/serialization.test.ts +2 -2
- package/src/bridge/crypto-assets/index.test.ts +15 -44
- package/src/bridge/impl.ts +3 -7
- package/src/currencies/cryptoIcons.test.ts +23 -4
- package/src/currencies/helpers.test.ts +13 -0
- package/src/currencies/index.ts +0 -3
- package/src/currencies/sortByMarketcap.test.ts +0 -26
- package/src/domain/getTokensWithFunds.test.ts +32 -3
- package/src/e2e/deviceInteraction/DeviceController.ts +85 -0
- package/src/e2e/families/algorand.ts +20 -13
- package/src/e2e/families/aptos.ts +28 -16
- package/src/e2e/families/bitcoin.ts +53 -39
- package/src/e2e/families/cardano.ts +47 -36
- package/src/e2e/families/celo.ts +18 -12
- package/src/e2e/families/cosmos.ts +35 -23
- package/src/e2e/families/evm.ts +24 -13
- package/src/e2e/families/hedera.ts +6 -4
- package/src/e2e/families/kaspa.ts +28 -16
- package/src/e2e/families/multiversX.ts +16 -10
- package/src/e2e/families/near.ts +23 -17
- package/src/e2e/families/osmosis.ts +19 -13
- package/src/e2e/families/polkadot.ts +19 -13
- package/src/e2e/families/solana.ts +35 -23
- package/src/e2e/families/stellar.ts +18 -13
- package/src/e2e/families/sui.ts +15 -9
- package/src/e2e/families/tezos.ts +25 -18
- package/src/e2e/families/tron.ts +19 -13
- package/src/e2e/families/xrp.ts +19 -13
- package/src/e2e/speculos.ts +168 -140
- package/src/exchange/swap/getCompleteSwapHistory.ts +1 -1
- package/src/exchange/swap/hooks/useSelectableCurrencies.test.ts +4 -0
- package/src/exchange/swap/hooks/useSelectableCurrencies.ts +1 -1
- package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +11 -11
- package/src/families/algorand/bridge.integration.test.ts +1 -1
- package/src/families/aptos/__snapshots__/bridge.integration.test.ts.snap +111 -1
- package/src/families/aptos/bridge.integration.test.ts +1 -1
- package/src/families/bitcoin/bridge.integration.test.ts +1 -1
- package/src/families/bitcoin/satstack.test.ts +5 -8
- package/src/families/canton/bridge/mock.ts +1 -0
- package/src/families/canton/react.ts +50 -0
- package/src/families/cardano/__snapshots__/bridge.integration.test.ts.snap +2 -2
- package/src/families/cardano/bridge.integration.test.ts +1 -1
- package/src/families/casper/bridge.integration.test.ts +1 -1
- package/src/families/celo/bridge.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +1 -1
- package/src/families/cosmos/datasets/axelar.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/babylon.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/coreum.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/cosmos.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/cryptoOrg.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/desmos.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/dydx.integration.FIXME.ts +1 -1
- package/src/families/cosmos/datasets/injective.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/mantra.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/onomy.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/osmosis.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/persistence.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/quicksilver.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/secretNetwork.integration.FIXME.ts +1 -1
- package/src/families/cosmos/datasets/seiNetwork.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/stargaze.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/umee.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/xion.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/zenrock.integration.test.ts +1 -1
- package/src/families/evm/bridge.integration.test.ts +1 -1
- package/src/families/evm/setup.ts +0 -12
- package/src/families/filecoin/bridge.integration.test.ts +1 -1
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +191 -596
- package/src/families/hedera/bridge.integration.test.ts +1 -1
- package/src/families/icon/bridge.integration.test.ts +1 -1
- package/src/families/internet_computer/bridge.integration.test.ts +1 -1
- package/src/families/kaspa/bridge.integration.test.ts +1 -1
- package/src/families/mina/bridge.integration.test.ts +1 -1
- package/src/families/multiversx/bridge.integration.test.ts +1 -1
- package/src/families/multiversx/synchronisation.integration.test.ts +1 -1
- package/src/families/near/bridge.integration.test.ts +1 -1
- package/src/families/polkadot/bridge.integration.test.ts +1 -1
- package/src/families/solana/__snapshots__/bridge.integration.test.ts.snap +14 -44
- package/src/families/solana/bridge.integration.test.ts +1 -1
- package/src/families/solana/setup.ts +37 -24
- package/src/families/stacks/__tests__/sync.integration.test.ts +1 -1
- package/src/families/stacks/bridge.integration.test.ts +1 -1
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +3 -3
- package/src/families/stellar/bridge.integration.test.ts +1 -1
- package/src/families/sui/bridge.integration.test.ts +1 -1
- package/src/families/tezos/bridge.integration.test.ts +1 -1
- package/src/families/ton/bridge.integration.test.ts +1 -1
- package/src/families/tron/bridge.integration.test.ts +1 -1
- package/src/families/tron/data.mock.ts +4 -8
- package/src/families/vechain/bridge.integration.test.ts +1 -1
- package/src/families/xrp/bridge.integration.test.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +3 -0
- package/src/test-helpers/cryptoAssetsStore.ts +5 -0
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +3 -3
- package/src/wallet-api/ACRE/server.test.ts +3 -4
- package/src/wallet-api/ACRE/server.ts +1 -1
- package/src/wallet-api/Exchange/server.ts +1 -1
- package/src/wallet-api/logic.test.ts +3 -3
- package/src/wallet-api/logic.ts +1 -1
- package/src/wallet-api/react.ts +3 -1
- package/src/wallet-api/useDappLogic.ts +1 -1
- package/lib/__tests__/test-helpers/setup.d.ts +0 -2
- package/lib/__tests__/test-helpers/setup.d.ts.map +0 -1
- package/lib/__tests__/test-helpers/setup.js.map +0 -1
- package/lib/bridge/crypto-assets/index.d.ts +0 -4
- package/lib/bridge/crypto-assets/index.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/index.js +0 -22
- package/lib/bridge/crypto-assets/index.js.map +0 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -26
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
- package/lib-es/__tests__/test-helpers/setup.d.ts +0 -2
- package/lib-es/__tests__/test-helpers/setup.d.ts.map +0 -1
- package/lib-es/__tests__/test-helpers/setup.js +0 -18
- package/lib-es/__tests__/test-helpers/setup.js.map +0 -1
- package/lib-es/bridge/crypto-assets/index.d.ts +0 -4
- package/lib-es/bridge/crypto-assets/index.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/index.js +0 -17
- package/lib-es/bridge/crypto-assets/index.js.map +0 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -18
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
- package/src/bridge/crypto-assets/index.ts +0 -23
- package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +0 -23
|
@@ -2,49 +2,63 @@ import expect from "expect";
|
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { waitFor, containsSubstringInEvent, pressUntilTextFound, getSendEvents } from "../speculos";
|
|
4
4
|
import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
|
|
5
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
6
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
6
|
import invariant from "invariant";
|
|
8
7
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
9
8
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
9
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export async function sendBTC(tx: Transaction) {
|
|
28
|
-
const speculosDevice = getSpeculosModel();
|
|
29
|
-
try {
|
|
30
|
-
const events = await getSendEvents(tx);
|
|
31
|
-
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
32
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
33
|
-
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
34
|
-
expect(isAddressCorrect).toBeTruthy();
|
|
35
|
-
if (isTouchDevice()) {
|
|
36
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
37
|
-
} else {
|
|
38
|
-
await pressBoth();
|
|
39
|
-
if (speculosDevice === DeviceModelId.nanoS) {
|
|
40
|
-
await pressUntilTextFound(DeviceLabels.SIGN);
|
|
41
|
-
await pressBoth();
|
|
42
|
-
await waitFor(DeviceLabels.BITCOIN_IS_READY);
|
|
11
|
+
export const sendBTCBasedCoin = withDeviceController(
|
|
12
|
+
({ getButtonsController }) =>
|
|
13
|
+
async (tx: Transaction) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
15
|
+
|
|
16
|
+
const events = await getSendEvents(tx);
|
|
17
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
18
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
19
|
+
|
|
20
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
21
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
22
|
+
|
|
23
|
+
if (isTouchDevice()) {
|
|
24
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
43
25
|
} else {
|
|
44
|
-
await
|
|
26
|
+
await buttons.both();
|
|
27
|
+
await waitFor(DeviceLabels.CONFIRM);
|
|
28
|
+
await pressUntilTextFound(DeviceLabels.ACCEPT);
|
|
29
|
+
await buttons.both();
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export const sendBTC = withDeviceController(
|
|
35
|
+
({ getButtonsController }) =>
|
|
36
|
+
async (tx: Transaction) => {
|
|
37
|
+
const buttons = getButtonsController();
|
|
38
|
+
const speculosDevice = getSpeculosModel();
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const events = await getSendEvents(tx);
|
|
42
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
43
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
44
|
+
|
|
45
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
46
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
47
|
+
|
|
48
|
+
if (isTouchDevice()) {
|
|
49
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
50
|
+
} else {
|
|
51
|
+
await buttons.both();
|
|
52
|
+
if (speculosDevice === DeviceModelId.nanoS) {
|
|
53
|
+
await pressUntilTextFound(DeviceLabels.SIGN);
|
|
54
|
+
await buttons.both();
|
|
55
|
+
await waitFor(DeviceLabels.BITCOIN_IS_READY);
|
|
56
|
+
} else {
|
|
57
|
+
await waitFor(DeviceLabels.TRANSACTION_SIGNED);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} catch (e) {
|
|
61
|
+
invariant(false, `Error while sending BTC transaction: ${e}`);
|
|
45
62
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
invariant(false, `Error while sending BTC transaction: ${e}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
63
|
+
},
|
|
64
|
+
);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import expect from "expect";
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
3
|
import { pressUntilTextFound, containsSubstringInEvent, waitFor } from "../speculos";
|
|
4
|
-
import { getSpeculosModel } from "../speculosAppVersion";
|
|
5
|
-
import { pressBoth, pressRightButton } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
4
|
+
import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
|
|
6
5
|
import {
|
|
7
6
|
pressAndRelease,
|
|
8
7
|
longPressAndRelease,
|
|
@@ -10,7 +9,7 @@ import {
|
|
|
10
9
|
} from "../deviceInteraction/TouchDeviceSimulator";
|
|
11
10
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
12
11
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
13
|
-
import {
|
|
12
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
14
13
|
|
|
15
14
|
type ActionType = "both" | "right" | "tap" | "swipe" | "confirm" | "hold";
|
|
16
15
|
|
|
@@ -32,32 +31,40 @@ async function sendCardanoTouchDevices(tx: Transaction) {
|
|
|
32
31
|
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
export const sendCardanoNanoS = withDeviceController(
|
|
35
|
+
({ getButtonsController }) =>
|
|
36
|
+
async (_tx: Transaction) => {
|
|
37
|
+
const buttons = getButtonsController();
|
|
38
|
+
await waitFor(DeviceLabels.NEW_ORDINARY);
|
|
39
|
+
await buttons.right();
|
|
40
|
+
await waitFor(DeviceLabels.SEND_TO_ADDRESS);
|
|
41
|
+
await buttons.both();
|
|
42
|
+
await pressUntilTextFound(DeviceLabels.SEND);
|
|
43
|
+
await buttons.both();
|
|
44
|
+
await waitFor(DeviceLabels.TRANSACTION_FEE);
|
|
45
|
+
await buttons.both();
|
|
46
|
+
await waitFor(DeviceLabels.CONFIRM);
|
|
47
|
+
await buttons.right();
|
|
48
|
+
},
|
|
49
|
+
);
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
export const sendCardanoButtonDevice = withDeviceController(
|
|
52
|
+
({ getButtonsController }) =>
|
|
53
|
+
async (tx: Transaction) => {
|
|
54
|
+
const buttons = getButtonsController();
|
|
55
|
+
await waitFor(DeviceLabels.NEW_ORDINARY);
|
|
56
|
+
await buttons.both();
|
|
57
|
+
await pressUntilTextFound(DeviceLabels.SEND_TO_ADDRESS_2);
|
|
58
|
+
await buttons.both();
|
|
59
|
+
const events = await pressUntilTextFound(DeviceLabels.SEND);
|
|
60
|
+
validateTransactionData(tx, events);
|
|
61
|
+
await buttons.both();
|
|
62
|
+
await waitFor(DeviceLabels.TRANSACTION_FEE);
|
|
63
|
+
await buttons.both();
|
|
64
|
+
await waitFor(DeviceLabels.CONFIRM);
|
|
65
|
+
await buttons.both();
|
|
66
|
+
},
|
|
67
|
+
);
|
|
61
68
|
|
|
62
69
|
export async function sendCardano(tx: Transaction) {
|
|
63
70
|
const speculosModel = getSpeculosModel();
|
|
@@ -127,14 +134,18 @@ async function delegateTouchDevicesAction(label: DeviceLabels) {
|
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
137
|
+
export const delegateNanoAction = withDeviceController(
|
|
138
|
+
({ getButtonsController }) =>
|
|
139
|
+
async (label: DeviceLabels, action: ActionType) => {
|
|
140
|
+
const buttons = getButtonsController();
|
|
141
|
+
await waitFor(label);
|
|
142
|
+
if (action === "both") {
|
|
143
|
+
await buttons.both();
|
|
144
|
+
} else {
|
|
145
|
+
await buttons.right();
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
);
|
|
138
149
|
|
|
139
150
|
async function executeDelegateStep(label: DeviceLabels, action: ActionType) {
|
|
140
151
|
try {
|
package/src/e2e/families/celo.ts
CHANGED
|
@@ -2,18 +2,24 @@ import { containsSubstringInEvent, getDelegateEvents, pressUntilTextFound } from
|
|
|
2
2
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
3
3
|
import { Delegate } from "../models/Delegate";
|
|
4
4
|
import expect from "expect";
|
|
5
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
6
5
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
export const delegateCelo = withDeviceController(
|
|
10
|
+
({ getButtonsController }) =>
|
|
11
|
+
async (delegatingAccount: Delegate) => {
|
|
12
|
+
const buttons = getButtonsController();
|
|
13
|
+
|
|
14
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
15
|
+
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
|
16
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
17
|
+
|
|
18
|
+
if (isTouchDevice()) {
|
|
19
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
20
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
|
+
} else {
|
|
22
|
+
await buttons.both();
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
);
|
|
@@ -2,32 +2,44 @@ 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";
|
|
6
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
6
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
8
7
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
8
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (isTouchDevice()) {
|
|
15
|
-
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
16
|
-
} else {
|
|
17
|
-
await pressBoth();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
10
|
+
export const delegateCosmos = withDeviceController(
|
|
11
|
+
({ getButtonsController }) =>
|
|
12
|
+
async (delegatingAccount: Delegate) => {
|
|
13
|
+
const buttons = getButtonsController();
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
expect(isAmountCorrect).toBeTruthy();
|
|
25
|
-
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
26
|
-
expect(isAddressCorrect).toBeTruthy();
|
|
15
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
16
|
+
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
|
17
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
19
|
+
if (isTouchDevice()) {
|
|
20
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
|
+
} else {
|
|
22
|
+
await buttons.both();
|
|
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
|
+
);
|
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 } from "../speculosAppVersion";
|
|
5
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
4
|
+
import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
|
|
6
5
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
6
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
8
7
|
import { Device } from "../enum/Device";
|
|
9
8
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
10
|
-
import {
|
|
9
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
11
10
|
|
|
12
11
|
function validateTransactionData(tx: Transaction, events: string[]) {
|
|
13
12
|
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
14
13
|
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,20 +27,31 @@ async function sendEvmTouchDevices(tx: Transaction) {
|
|
|
27
27
|
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
30
|
+
export const sendEvmButtonDevice = withDeviceController(
|
|
31
|
+
({ getButtonsController }) =>
|
|
32
|
+
async (tx: Transaction) => {
|
|
33
|
+
const buttons = getButtonsController();
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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();
|
|
45
|
+
|
|
46
|
+
const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
|
|
47
|
+
validateTransactionData(tx, events);
|
|
48
|
+
await buttons.both();
|
|
49
|
+
},
|
|
50
|
+
);
|
|
41
51
|
|
|
42
52
|
export async function sendEVM(tx: Transaction) {
|
|
43
53
|
const speculosModel = getSpeculosModel();
|
|
54
|
+
|
|
44
55
|
if (isTouchDevice()) {
|
|
45
56
|
return sendEvmTouchDevices(tx);
|
|
46
57
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
2
1
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
3
2
|
import { pressUntilTextFound } from "../speculos";
|
|
3
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
4
|
+
|
|
5
|
+
export const sendHedera = withDeviceController(({ getButtonsController }) => async () => {
|
|
6
|
+
const buttons = getButtonsController();
|
|
4
7
|
|
|
5
|
-
export async function sendHedera() {
|
|
6
8
|
await pressUntilTextFound(DeviceLabels.APPROVE);
|
|
7
|
-
await
|
|
8
|
-
}
|
|
9
|
+
await buttons.both();
|
|
10
|
+
});
|
|
@@ -1,25 +1,37 @@
|
|
|
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";
|
|
5
4
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
6
5
|
import { Delegate } from "../models/Delegate";
|
|
7
6
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
8
7
|
import { Transaction } from "../models/Transaction";
|
|
8
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} else {
|
|
15
|
-
await pressBoth();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
10
|
+
export const sendKaspa = withDeviceController(
|
|
11
|
+
({ getButtonsController }) =>
|
|
12
|
+
async (tx: Transaction) => {
|
|
13
|
+
const buttons = getButtonsController();
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
15
|
+
await getSendEvents(tx);
|
|
16
|
+
|
|
17
|
+
if (isTouchDevice()) {
|
|
18
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
19
|
+
} else {
|
|
20
|
+
await buttons.both();
|
|
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
|
+
);
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { getDelegateEvents, pressUntilTextFound } from "../speculos";
|
|
2
2
|
import { Delegate } from "../models/Delegate";
|
|
3
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
4
3
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
5
4
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
6
5
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
6
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
export const delegateMultiversX = withDeviceController(
|
|
9
|
+
({ getButtonsController }) =>
|
|
10
|
+
async (delegatingAccount: Delegate) => {
|
|
11
|
+
const buttons = getButtonsController();
|
|
12
|
+
|
|
13
|
+
await getDelegateEvents(delegatingAccount);
|
|
14
|
+
|
|
15
|
+
if (isTouchDevice()) {
|
|
16
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
17
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
|
+
} else {
|
|
19
|
+
await buttons.both();
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
);
|
package/src/e2e/families/near.ts
CHANGED
|
@@ -7,23 +7,29 @@ import {
|
|
|
7
7
|
pressUntilTextFound,
|
|
8
8
|
} from "../speculos";
|
|
9
9
|
import { isTouchDevice } from "../speculosAppVersion";
|
|
10
|
-
import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
|
|
11
10
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
12
11
|
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
|
-
|
|
14
|
+
export const delegateNear = withDeviceController(
|
|
15
|
+
({ getButtonsController }) =>
|
|
16
|
+
async (delegatingAccount: Delegate) => {
|
|
17
|
+
const buttons = getButtonsController();
|
|
18
|
+
|
|
19
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
20
|
+
const isProviderCorrect = containsSubstringInEvent(delegatingAccount.provider, events);
|
|
21
|
+
expect(isProviderCorrect).toBeTruthy();
|
|
22
|
+
|
|
23
|
+
if (isTouchDevice()) {
|
|
24
|
+
await pressAndRelease(DeviceLabels.CONFIRM_HEADER);
|
|
25
|
+
await waitFor(DeviceLabels.VIEW_ACTION);
|
|
26
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
27
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
28
|
+
} else {
|
|
29
|
+
await buttons.both();
|
|
30
|
+
await waitFor(DeviceLabels.VIEW_ACTION);
|
|
31
|
+
await pressUntilTextFound(DeviceLabels.SIGN);
|
|
32
|
+
await buttons.both();
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
);
|
|
@@ -2,19 +2,25 @@ 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";
|
|
6
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
6
|
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
|
-
|
|
9
|
+
export const delegateOsmosis = withDeviceController(
|
|
10
|
+
({ getButtonsController }) =>
|
|
11
|
+
async (delegatingAccount: Delegate) => {
|
|
12
|
+
const buttons = getButtonsController();
|
|
13
|
+
|
|
14
|
+
const events = await getDelegateEvents(delegatingAccount);
|
|
15
|
+
const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
|
|
16
|
+
const isAmountCorrect = containsSubstringInEvent(amountInUosmo, events);
|
|
17
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
18
|
+
|
|
19
|
+
if (isTouchDevice()) {
|
|
20
|
+
await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
|
|
21
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
22
|
+
} else {
|
|
23
|
+
await buttons.both();
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
);
|
|
@@ -2,20 +2,26 @@ 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";
|
|
6
5
|
import { DeviceLabels } from "../enum/DeviceLabels";
|
|
7
6
|
import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
|
|
7
|
+
import { withDeviceController } from "../deviceInteraction/DeviceController";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
14
|
-
expect(isAddressCorrect).toBeTruthy();
|
|
9
|
+
export const sendPolkadot = withDeviceController(
|
|
10
|
+
({ getButtonsController }) =>
|
|
11
|
+
async (tx: Transaction) => {
|
|
12
|
+
const buttons = getButtonsController();
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const events = await getSendEvents(tx);
|
|
15
|
+
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
|
16
|
+
expect(isAmountCorrect).toBeTruthy();
|
|
17
|
+
|
|
18
|
+
const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
|
|
19
|
+
expect(isAddressCorrect).toBeTruthy();
|
|
20
|
+
|
|
21
|
+
if (isTouchDevice()) {
|
|
22
|
+
await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
|
|
23
|
+
} else {
|
|
24
|
+
await buttons.both();
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
);
|