UNPKG

@ledgerhq/live-common

Version:
23 lines 1.11 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.delegateAptos = exports.sendAptos = void 0; const expect_1 = __importDefault(require("expect")); const speculos_1 = require("../speculos"); const DeviceLabels_1 = require("../enum/DeviceLabels"); async function sendAptos() { await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.APPROVE); await (0, speculos_1.pressBoth)(); } exports.sendAptos = sendAptos; async function delegateAptos(delegatingAccount) { await (0, speculos_1.waitFor)(DeviceLabels_1.DeviceLabels.REVIEW_OPERATION); const events = await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.APPROVE); const isAmountCorrect = (0, speculos_1.containsSubstringInEvent)(delegatingAccount.amount, events); (0, expect_1.default)(isAmountCorrect).toBeTruthy(); await (0, speculos_1.pressBoth)(); } exports.delegateAptos = delegateAptos; //# sourceMappingURL=aptos.js.map