@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
15 lines • 656 B
JavaScript
import expect from "expect";
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";
export async function sendAptos() {
await pressUntilTextFound(DeviceLabels.APPROVE);
await pressBoth();
}
export async function delegateAptos(delegatingAccount) {
await waitFor(DeviceLabels.REVIEW_OPERATION);
const events = await pressUntilTextFound(DeviceLabels.APPROVE);
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
expect(isAmountCorrect).toBeTruthy();
await pressBoth();
}
//# sourceMappingURL=aptos.js.map