@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
18 lines • 912 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.delegateTezos = void 0;
const speculos_1 = require("../speculos");
const types_devices_1 = require("@ledgerhq/types-devices");
const DeviceLabels_1 = require("../enum/DeviceLabels");
async function delegateTezos(delegatingAccount) {
const { delegateConfirmLabel } = (0, speculos_1.getDeviceLabels)(delegatingAccount.account.currency.speculosApp);
await (0, speculos_1.getDelegateEvents)(delegatingAccount);
await (0, speculos_1.pressUntilTextFound)(delegateConfirmLabel);
await (0, speculos_1.pressBoth)();
if ((0, speculos_1.getSpeculosModel)() == types_devices_1.DeviceModelId.nanoS) {
await (0, speculos_1.pressUntilTextFound)(DeviceLabels_1.DeviceLabels.ACCEPT_AND_SEND);
await (0, speculos_1.pressBoth)();
}
}
exports.delegateTezos = delegateTezos;
//# sourceMappingURL=tezos.js.map