@ledgerhq/live-common 34.53.0-nightly.20251119110540 → 34.53.0-nightly.20251120023735
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/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 +6 -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/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/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +2 -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/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +2 -0
- package/lib/wallet-api/react.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 +6 -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/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/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +2 -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/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +2 -0
- package/lib-es/wallet-api/react.js.map +1 -1
- package/package.json +52 -51
- 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/families/canton/bridge/mock.ts +1 -0
- package/src/families/canton/react.ts +50 -0
- package/src/featureFlags/defaultFeatures.ts +2 -0
- package/src/wallet-api/react.ts +2 -0
- 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/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/e2e/deviceInteraction/ButtonDeviceSimulator.ts +0 -23
package/lib/e2e/families/evm.js
CHANGED
|
@@ -3,16 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.sendEVM = void 0;
|
|
6
|
+
exports.sendEVM = exports.sendEvmNanoS = exports.sendEvmButtonDevice = void 0;
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
12
11
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
13
12
|
const Device_1 = require("../enum/Device");
|
|
14
13
|
const types_devices_1 = require("@ledgerhq/types-devices");
|
|
15
|
-
const
|
|
14
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
16
15
|
function validateTransactionData(tx, events) {
|
|
17
16
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(tx.amount, events);
|
|
18
17
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
@@ -30,25 +29,27 @@ async function sendEvmTouchDevices(tx) {
|
|
|
30
29
|
validateTransactionData(tx, events);
|
|
31
30
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
32
31
|
}
|
|
33
|
-
|
|
32
|
+
exports.sendEvmButtonDevice = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
33
|
+
const buttons = getButtonsController();
|
|
34
34
|
const events = await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.SIGN_TRANSACTION);
|
|
35
35
|
validateTransactionData(tx, events);
|
|
36
|
-
await
|
|
37
|
-
}
|
|
38
|
-
|
|
36
|
+
await buttons.both();
|
|
37
|
+
});
|
|
38
|
+
exports.sendEvmNanoS = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
39
|
+
const buttons = getButtonsController();
|
|
39
40
|
const events = await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.ACCEPT);
|
|
40
41
|
validateTransactionData(tx, events);
|
|
41
|
-
await
|
|
42
|
-
}
|
|
42
|
+
await buttons.both();
|
|
43
|
+
});
|
|
43
44
|
async function sendEVM(tx) {
|
|
44
45
|
const speculosModel = (0, speculosAppVersion_1.getSpeculosModel)();
|
|
45
|
-
if ((0,
|
|
46
|
+
if ((0, speculosAppVersion_1.isTouchDevice)()) {
|
|
46
47
|
return sendEvmTouchDevices(tx);
|
|
47
48
|
}
|
|
48
49
|
if (speculosModel === types_devices_1.DeviceModelId.nanoS) {
|
|
49
|
-
return sendEvmNanoS(tx);
|
|
50
|
+
return (0, exports.sendEvmNanoS)(tx);
|
|
50
51
|
}
|
|
51
|
-
return sendEvmButtonDevice(tx);
|
|
52
|
+
return (0, exports.sendEvmButtonDevice)(tx);
|
|
52
53
|
}
|
|
53
54
|
exports.sendEVM = sendEVM;
|
|
54
55
|
//# sourceMappingURL=evm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../src/e2e/families/evm.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../src/e2e/families/evm.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAA4E;AAC5E,8DAAwE;AACxE,oFAAgF;AAChF,uDAAoD;AACpD,2CAAwC;AACxC,2DAAwD;AACxD,4EAA6E;AAE7E,SAAS,uBAAuB,CAAC,EAAe,EAAE,MAAgB;IAChE,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpE,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,IAAI,EAAE,CAAC,eAAe,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,eAAM,CAAC,GAAG,CAAC,IAAI,EAAE;QACjF,MAAM,gBAAgB,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACtF,IAAA,gBAAM,EAAC,gBAAgB,CAAC,CAAC,UAAU,EAAE,CAAC;KACvC;SAAM;QACL,MAAM,gBAAgB,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACtF,IAAA,gBAAM,EAAC,gBAAgB,CAAC,CAAC,UAAU,EAAE,CAAC;KACvC;AACH,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,EAAe;IAChD,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,YAAY,CAAC,CAAC;IACpE,uBAAuB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAEY,QAAA,mBAAmB,GAAG,IAAA,uCAAoB,EACrD,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,gBAAgB,CAAC,CAAC;IACxE,uBAAuB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC,CACJ,CAAC;AAEW,QAAA,YAAY,GAAG,IAAA,uCAAoB,EAC9C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,MAAM,CAAC,CAAC;IAC9D,uBAAuB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC,CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,EAAe;IAC3C,MAAM,aAAa,GAAG,IAAA,qCAAgB,GAAE,CAAC;IAEzC,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;KAChC;IACD,IAAI,aAAa,KAAK,6BAAa,CAAC,KAAK,EAAE;QACzC,OAAO,IAAA,oBAAY,EAAC,EAAE,CAAC,CAAC;KACzB;IACD,OAAO,IAAA,2BAAmB,EAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAVD,0BAUC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const sendHedera: () => void | Promise<void>;
|
|
2
2
|
//# sourceMappingURL=hedera.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hedera.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/hedera.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"hedera.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/hedera.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,4BAKrB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendHedera = void 0;
|
|
4
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
5
4
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
6
5
|
const speculos_1 = require("../speculos");
|
|
7
|
-
|
|
6
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
7
|
+
exports.sendHedera = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async () => {
|
|
8
|
+
const buttons = getButtonsController();
|
|
8
9
|
await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.APPROVE);
|
|
9
|
-
await
|
|
10
|
-
}
|
|
11
|
-
exports.sendHedera = sendHedera;
|
|
10
|
+
await buttons.both();
|
|
11
|
+
});
|
|
12
12
|
//# sourceMappingURL=hedera.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hedera.js","sourceRoot":"","sources":["../../../src/e2e/families/hedera.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"hedera.js","sourceRoot":"","sources":["../../../src/e2e/families/hedera.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,0CAAkD;AAClD,4EAA6E;AAEhE,QAAA,UAAU,GAAG,IAAA,uCAAoB,EAAC,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE;IACtF,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Delegate } from "../models/Delegate";
|
|
2
2
|
import { Transaction } from "../models/Transaction";
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
3
|
+
export declare const sendKaspa: (tx: Transaction) => void | Promise<void>;
|
|
4
|
+
export declare const delegateKaspa: (delegatingAccount: Delegate) => void | Promise<void>;
|
|
5
5
|
//# sourceMappingURL=kaspa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kaspa.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/kaspa.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kaspa.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/kaspa.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,eAAO,MAAM,SAAS,2CAarB,CAAC;AAEF,eAAO,MAAM,aAAa,uDAYzB,CAAC"}
|
|
@@ -7,25 +7,25 @@ exports.delegateKaspa = exports.sendKaspa = void 0;
|
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.sendKaspa = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
await (0, speculos_1.getSendEvents)(tx);
|
|
15
16
|
if ((0, speculosAppVersion_1.isTouchDevice)()) {
|
|
16
17
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
|
-
await
|
|
20
|
+
await buttons.both();
|
|
20
21
|
}
|
|
21
|
-
}
|
|
22
|
-
exports.
|
|
23
|
-
|
|
22
|
+
});
|
|
23
|
+
exports.delegateKaspa = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
24
|
+
const buttons = getButtonsController();
|
|
24
25
|
await (0, speculos_1.waitFor)(DeviceLabels_1.DeviceLabels.REVIEW_OPERATION);
|
|
25
26
|
const events = await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.APPROVE);
|
|
26
27
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(delegatingAccount.amount, events);
|
|
27
28
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
28
|
-
await
|
|
29
|
-
}
|
|
30
|
-
exports.delegateKaspa = delegateKaspa;
|
|
29
|
+
await buttons.both();
|
|
30
|
+
});
|
|
31
31
|
//# sourceMappingURL=kaspa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kaspa.js","sourceRoot":"","sources":["../../../src/e2e/families/kaspa.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,0CAAoG;AACpG,8DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"kaspa.js","sourceRoot":"","sources":["../../../src/e2e/families/kaspa.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,0CAAoG;AACpG,8DAAsD;AACtD,uDAAoD;AAEpD,oFAAgF;AAEhF,4EAA6E;AAEhE,QAAA,SAAS,GAAG,IAAA,uCAAoB,EAC3C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,wBAAa,EAAC,EAAE,CAAC,CAAC;IAExB,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC;AAEW,QAAA,aAAa,GAAG,IAAA,uCAAoB,EAC/C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,kBAAO,EAAC,2BAAY,CAAC,gBAAgB,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnF,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC,CACJ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Delegate } from "../models/Delegate";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const delegateMultiversX: (delegatingAccount: Delegate) => void | Promise<void>;
|
|
3
3
|
//# sourceMappingURL=multiversX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiversX.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/multiversX.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C,
|
|
1
|
+
{"version":3,"file":"multiversX.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/multiversX.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C,eAAO,MAAM,kBAAkB,uDAc9B,CAAC"}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.delegateMultiversX = void 0;
|
|
4
4
|
const speculos_1 = require("../speculos");
|
|
5
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
6
5
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
7
6
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
8
7
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
9
|
-
|
|
8
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
9
|
+
exports.delegateMultiversX = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
10
|
+
const buttons = getButtonsController();
|
|
10
11
|
await (0, speculos_1.getDelegateEvents)(delegatingAccount);
|
|
11
12
|
if ((0, speculosAppVersion_1.isTouchDevice)()) {
|
|
12
13
|
await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN);
|
|
13
14
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
14
15
|
}
|
|
15
16
|
else {
|
|
16
|
-
await
|
|
17
|
+
await buttons.both();
|
|
17
18
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.delegateMultiversX = delegateMultiversX;
|
|
19
|
+
});
|
|
20
20
|
//# sourceMappingURL=multiversX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiversX.js","sourceRoot":"","sources":["../../../src/e2e/families/multiversX.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,
|
|
1
|
+
{"version":3,"file":"multiversX.js","sourceRoot":"","sources":["../../../src/e2e/families/multiversX.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,uDAAoD;AACpD,8DAAsD;AACtD,oFAAgF;AAChF,4EAA6E;AAEhE,QAAA,kBAAkB,GAAG,IAAA,uCAAoB,EACpD,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,4BAAiB,EAAC,iBAAiB,CAAC,CAAC;IAE3C,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/near.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAY9C,
|
|
1
|
+
{"version":3,"file":"near.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/near.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAY9C,eAAO,MAAM,YAAY,uDAqBxB,CAAC"}
|
package/lib/e2e/families/near.js
CHANGED
|
@@ -7,10 +7,11 @@ exports.delegateNear = void 0;
|
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.delegateNear = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
const events = await (0, speculos_1.getDelegateEvents)(delegatingAccount);
|
|
15
16
|
const isProviderCorrect = (0, speculos_1.containsSubstringInEvent)(delegatingAccount.provider, events);
|
|
16
17
|
(0, expect_1.default)(isProviderCorrect).toBeTruthy();
|
|
@@ -21,11 +22,10 @@ async function delegateNear(delegatingAccount) {
|
|
|
21
22
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
22
23
|
}
|
|
23
24
|
else {
|
|
24
|
-
await
|
|
25
|
+
await buttons.both();
|
|
25
26
|
await (0, speculos_1.waitFor)(DeviceLabels_1.DeviceLabels.VIEW_ACTION);
|
|
26
27
|
await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.SIGN);
|
|
27
|
-
await
|
|
28
|
+
await buttons.both();
|
|
28
29
|
}
|
|
29
|
-
}
|
|
30
|
-
exports.delegateNear = delegateNear;
|
|
30
|
+
});
|
|
31
31
|
//# sourceMappingURL=near.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near.js","sourceRoot":"","sources":["../../../src/e2e/families/near.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAKqB;AACrB,8DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"near.js","sourceRoot":"","sources":["../../../src/e2e/families/near.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAKqB;AACrB,8DAAsD;AACtD,uDAAoD;AACpD,oFAAiG;AACjG,4EAA6E;AAEhE,QAAA,YAAY,GAAG,IAAA,uCAAoB,EAC9C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAiB,EAAC,iBAAiB,CAAC,CAAC;IAC1D,MAAM,iBAAiB,GAAG,IAAA,mCAAwB,EAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvF,IAAA,gBAAM,EAAC,iBAAiB,CAAC,CAAC,UAAU,EAAE,CAAC;IAEvC,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,sCAAe,EAAC,2BAAY,CAAC,cAAc,CAAC,CAAC;QACnD,MAAM,IAAA,kBAAO,EAAC,2BAAY,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,MAAM,IAAA,kBAAO,EAAC,2BAAY,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"osmosis.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/osmosis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C,
|
|
1
|
+
{"version":3,"file":"osmosis.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/osmosis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C,eAAO,MAAM,eAAe,uDAiB3B,CAAC"}
|
|
@@ -7,10 +7,11 @@ exports.delegateOsmosis = void 0;
|
|
|
7
7
|
const speculos_1 = require("../speculos");
|
|
8
8
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
9
9
|
const expect_1 = __importDefault(require("expect"));
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.delegateOsmosis = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
const events = await (0, speculos_1.getDelegateEvents)(delegatingAccount);
|
|
15
16
|
const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
|
|
16
17
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(amountInUosmo, events);
|
|
@@ -20,8 +21,7 @@ async function delegateOsmosis(delegatingAccount) {
|
|
|
20
21
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
await
|
|
24
|
+
await buttons.both();
|
|
24
25
|
}
|
|
25
|
-
}
|
|
26
|
-
exports.delegateOsmosis = delegateOsmosis;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=osmosis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"osmosis.js","sourceRoot":"","sources":["../../../src/e2e/families/osmosis.ts"],"names":[],"mappings":";;;;;;AACA,0CAA+F;AAC/F,8DAAsD;AACtD,oDAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"osmosis.js","sourceRoot":"","sources":["../../../src/e2e/families/osmosis.ts"],"names":[],"mappings":";;;;;;AACA,0CAA+F;AAC/F,8DAAsD;AACtD,oDAA4B;AAC5B,uDAAoD;AACpD,oFAAgF;AAChF,4EAA6E;AAEhE,QAAA,eAAe,GAAG,IAAA,uCAAoB,EACjD,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAiB,EAAC,iBAAiB,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;IAChF,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACxE,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/polkadot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,
|
|
1
|
+
{"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/polkadot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,eAAO,MAAM,YAAY,2CAkBxB,CAAC"}
|
|
@@ -7,10 +7,11 @@ exports.sendPolkadot = void 0;
|
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.sendPolkadot = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
const events = await (0, speculos_1.getSendEvents)(tx);
|
|
15
16
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(tx.amount, events);
|
|
16
17
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
@@ -20,8 +21,7 @@ async function sendPolkadot(tx) {
|
|
|
20
21
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
await
|
|
24
|
+
await buttons.both();
|
|
24
25
|
}
|
|
25
|
-
}
|
|
26
|
-
exports.sendPolkadot = sendPolkadot;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=polkadot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polkadot.js","sourceRoot":"","sources":["../../../src/e2e/families/polkadot.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAAsE;AACtE,8DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"polkadot.js","sourceRoot":"","sources":["../../../src/e2e/families/polkadot.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAAsE;AACtE,8DAAsD;AACtD,uDAAoD;AACpD,oFAAgF;AAChF,4EAA6E;AAEhE,QAAA,YAAY,GAAG,IAAA,uCAAoB,EAC9C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAa,EAAC,EAAE,CAAC,CAAC;IACvC,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpE,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,MAAM,gBAAgB,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtF,IAAA,gBAAM,EAAC,gBAAgB,CAAC,CAAC,UAAU,EAAE,CAAC;IAEtC,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Transaction } from "../models/Transaction";
|
|
2
2
|
import { Delegate } from "../models/Delegate";
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
3
|
+
export declare const delegateSolana: (delegatingAccount: Delegate) => void | Promise<void>;
|
|
4
|
+
export declare const sendSolana: (tx: Transaction) => void | Promise<void>;
|
|
5
5
|
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/solana.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/solana.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,eAAO,MAAM,cAAc,uDAa1B,CAAC;AAEF,eAAO,MAAM,UAAU,2CAoBtB,CAAC"}
|
|
@@ -8,20 +8,21 @@ const expect_1 = __importDefault(require("expect"));
|
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
10
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
11
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
12
11
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
13
12
|
const Device_1 = require("../enum/Device");
|
|
14
|
-
|
|
13
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
14
|
+
exports.delegateSolana = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
15
|
+
const buttons = getButtonsController();
|
|
15
16
|
await (0, speculos_1.getDelegateEvents)(delegatingAccount);
|
|
16
17
|
if ((0, speculosAppVersion_1.isTouchDevice)()) {
|
|
17
18
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
19
|
}
|
|
19
20
|
else {
|
|
20
|
-
await
|
|
21
|
+
await buttons.both();
|
|
21
22
|
}
|
|
22
|
-
}
|
|
23
|
-
exports.
|
|
24
|
-
|
|
23
|
+
});
|
|
24
|
+
exports.sendSolana = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
25
|
+
const buttons = getButtonsController();
|
|
25
26
|
const events = await (0, speculos_1.getSendEvents)(tx);
|
|
26
27
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(tx.amount, events);
|
|
27
28
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
@@ -33,8 +34,7 @@ async function sendSolana(tx) {
|
|
|
33
34
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
await
|
|
37
|
+
await buttons.both();
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
|
-
exports.sendSolana = sendSolana;
|
|
39
|
+
});
|
|
40
40
|
//# sourceMappingURL=solana.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../src/e2e/families/solana.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,0CAAyF;AACzF,8DAAsD;AACtD,oFAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../src/e2e/families/solana.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,0CAAyF;AACzF,8DAAsD;AACtD,oFAAgF;AAChF,uDAAoD;AACpD,2CAAwC;AAGxC,4EAA6E;AAEhE,QAAA,cAAc,GAAG,IAAA,uCAAoB,EAChD,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,4BAAiB,EAAC,iBAAiB,CAAC,CAAC;IAE3C,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC;AAEW,QAAA,UAAU,GAAG,IAAA,uCAAoB,EAC5C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAa,EAAC,EAAE,CAAC,CAAC;IACvC,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpE,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,eAAM,CAAC,GAAG,CAAC,IAAI,EAAE;QACnD,MAAM,gBAAgB,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACtF,IAAA,gBAAM,EAAC,gBAAgB,CAAC,CAAC,UAAU,EAAE,CAAC;KACvC;IAED,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stellar.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/stellar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,
|
|
1
|
+
{"version":3,"file":"stellar.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/stellar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,eAAO,MAAM,WAAW,2CAkBvB,CAAC"}
|
|
@@ -7,10 +7,11 @@ exports.sendStellar = void 0;
|
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.sendStellar = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
const events = await (0, speculos_1.getSendEvents)(tx);
|
|
15
16
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(tx.amount, events);
|
|
16
17
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
@@ -20,8 +21,7 @@ async function sendStellar(tx) {
|
|
|
20
21
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
await
|
|
24
|
+
await buttons.both();
|
|
24
25
|
}
|
|
25
|
-
}
|
|
26
|
-
exports.sendStellar = sendStellar;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=stellar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stellar.js","sourceRoot":"","sources":["../../../src/e2e/families/stellar.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAAsE;AACtE,8DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"stellar.js","sourceRoot":"","sources":["../../../src/e2e/families/stellar.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAAsE;AACtE,8DAAsD;AACtD,uDAAoD;AACpD,oFAAgF;AAChF,4EAA6E;AAEhE,QAAA,WAAW,GAAG,IAAA,uCAAoB,EAC7C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAa,EAAC,EAAE,CAAC,CAAC;IACvC,MAAM,eAAe,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpE,IAAA,gBAAM,EAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;IAErC,MAAM,gBAAgB,GAAG,IAAA,mCAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtF,IAAA,gBAAM,EAAC,gBAAgB,CAAC,CAAC,UAAU,EAAE,CAAC;IAEtC,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/sui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/sui.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,eAAO,MAAM,OAAO,2CAanB,CAAC"}
|
package/lib/e2e/families/sui.js
CHANGED
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sendSui = void 0;
|
|
4
4
|
const speculos_1 = require("../speculos");
|
|
5
5
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
6
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
7
6
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
8
7
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
9
|
-
|
|
8
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
9
|
+
exports.sendSui = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
10
|
+
const buttons = getButtonsController();
|
|
10
11
|
await (0, speculos_1.getSendEvents)(tx);
|
|
11
12
|
if ((0, speculosAppVersion_1.isTouchDevice)()) {
|
|
12
13
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
13
14
|
}
|
|
14
15
|
else {
|
|
15
|
-
await
|
|
16
|
+
await buttons.both();
|
|
16
17
|
}
|
|
17
|
-
}
|
|
18
|
-
exports.sendSui = sendSui;
|
|
18
|
+
});
|
|
19
19
|
//# sourceMappingURL=sui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.js","sourceRoot":"","sources":["../../../src/e2e/families/sui.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAC5C,8DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"sui.js","sourceRoot":"","sources":["../../../src/e2e/families/sui.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAC5C,8DAAsD;AACtD,uDAAoD;AACpD,oFAAgF;AAEhF,4EAA6E;AAEhE,QAAA,OAAO,GAAG,IAAA,uCAAoB,EACzC,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,EAAe,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,IAAA,wBAAa,EAAC,EAAE,CAAC,CAAC;IAExB,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tezos.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/tezos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"tezos.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/tezos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C,eAAO,MAAM,aAAa,uDAwBzB,CAAC"}
|
|
@@ -5,10 +5,10 @@ const speculos_1 = require("../speculos");
|
|
|
5
5
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
6
6
|
const types_devices_1 = require("@ledgerhq/types-devices");
|
|
7
7
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
8
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
9
8
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
10
|
-
const
|
|
11
|
-
|
|
9
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
10
|
+
exports.delegateTezos = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (delegatingAccount) => {
|
|
11
|
+
const buttons = getButtonsController();
|
|
12
12
|
const { delegateConfirmLabel } = (0, speculos_1.getDeviceLabels)(delegatingAccount.account.currency.speculosApp);
|
|
13
13
|
await (0, speculos_1.getDelegateEvents)(delegatingAccount);
|
|
14
14
|
await (0, speculos_1.pressUntilTextFound)(delegateConfirmLabel);
|
|
@@ -17,12 +17,11 @@ async function delegateTezos(delegatingAccount) {
|
|
|
17
17
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
|
-
await
|
|
20
|
+
await buttons.both();
|
|
21
21
|
}
|
|
22
|
-
if ((0,
|
|
22
|
+
if ((0, speculosAppVersion_1.getSpeculosModel)() === types_devices_1.DeviceModelId.nanoS) {
|
|
23
23
|
await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.ACCEPT_AND_SEND);
|
|
24
|
-
await
|
|
24
|
+
await buttons.both();
|
|
25
25
|
}
|
|
26
|
-
}
|
|
27
|
-
exports.delegateTezos = delegateTezos;
|
|
26
|
+
});
|
|
28
27
|
//# sourceMappingURL=tezos.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tezos.js","sourceRoot":"","sources":["../../../src/e2e/families/tezos.ts"],"names":[],"mappings":";;;AAAA,0CAAsF;AACtF,
|
|
1
|
+
{"version":3,"file":"tezos.js","sourceRoot":"","sources":["../../../src/e2e/families/tezos.ts"],"names":[],"mappings":";;;AAAA,0CAAsF;AACtF,8DAAwE;AAExE,2DAAwD;AACxD,uDAAoD;AACpD,oFAAgF;AAChF,4EAA6E;AAEhE,QAAA,aAAa,GAAG,IAAA,uCAAoB,EAC/C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC3B,KAAK,EAAE,iBAA2B,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAA,0BAAe,EAC9C,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAC/C,CAAC;IAEF,MAAM,IAAA,4BAAiB,EAAC,iBAAiB,CAAC,CAAC;IAC3C,MAAM,IAAA,8BAAmB,EAAC,oBAAoB,CAAC,CAAC;IAEhD,IAAI,IAAA,kCAAa,GAAE,EAAE;QACnB,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,IAAA,0CAAmB,EAAC,2BAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;KACzD;SAAM;QACL,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;IAED,IAAI,IAAA,qCAAgB,GAAE,KAAK,6BAAa,CAAC,KAAK,EAAE;QAC9C,MAAM,IAAA,8BAAmB,EAAC,2BAAY,CAAC,eAAe,CAAC,CAAC;QACxD,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;KACtB;AACH,CAAC,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tron.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/tron.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,
|
|
1
|
+
{"version":3,"file":"tron.d.ts","sourceRoot":"","sources":["../../../src/e2e/families/tron.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,eAAO,MAAM,QAAQ,2CAkBpB,CAAC"}
|
package/lib/e2e/families/tron.js
CHANGED
|
@@ -7,10 +7,11 @@ exports.sendTron = void 0;
|
|
|
7
7
|
const expect_1 = __importDefault(require("expect"));
|
|
8
8
|
const speculos_1 = require("../speculos");
|
|
9
9
|
const speculosAppVersion_1 = require("../speculosAppVersion");
|
|
10
|
-
const ButtonDeviceSimulator_1 = require("../deviceInteraction/ButtonDeviceSimulator");
|
|
11
10
|
const DeviceLabels_1 = require("../enum/DeviceLabels");
|
|
12
11
|
const TouchDeviceSimulator_1 = require("../deviceInteraction/TouchDeviceSimulator");
|
|
13
|
-
|
|
12
|
+
const DeviceController_1 = require("../deviceInteraction/DeviceController");
|
|
13
|
+
exports.sendTron = (0, DeviceController_1.withDeviceController)(({ getButtonsController }) => async (tx) => {
|
|
14
|
+
const buttons = getButtonsController();
|
|
14
15
|
const events = await (0, speculos_1.getSendEvents)(tx);
|
|
15
16
|
const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(tx.amount, events);
|
|
16
17
|
(0, expect_1.default)(isAmountCorrect).toBeTruthy();
|
|
@@ -20,8 +21,7 @@ async function sendTron(tx) {
|
|
|
20
21
|
await (0, TouchDeviceSimulator_1.longPressAndRelease)(DeviceLabels_1.DeviceLabels.HOLD_TO_SIGN, 3);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
await
|
|
24
|
+
await buttons.both();
|
|
24
25
|
}
|
|
25
|
-
}
|
|
26
|
-
exports.sendTron = sendTron;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=tron.js.map
|