@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
14 lines • 696 B
JavaScript
import { getDelegateEvents, getDeviceLabels, getSpeculosModel, pressBoth, pressUntilTextFound, } from "../speculos";
import { DeviceModelId } from "@ledgerhq/types-devices";
import { DeviceLabels } from "../enum/DeviceLabels";
export async function delegateTezos(delegatingAccount) {
const { delegateConfirmLabel } = getDeviceLabels(delegatingAccount.account.currency.speculosApp);
await getDelegateEvents(delegatingAccount);
await pressUntilTextFound(delegateConfirmLabel);
await pressBoth();
if (getSpeculosModel() == DeviceModelId.nanoS) {
await pressUntilTextFound(DeviceLabels.ACCEPT_AND_SEND);
await pressBoth();
}
}
//# sourceMappingURL=tezos.js.map