@ledgerhq/coin-stacks
Version:
Ledger Stacks Coin integration
48 lines • 1.63 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.acceptTransaction = void 0;
const specs_1 = require("@ledgerhq/coin-framework/bot/specs");
exports.acceptTransaction = (0, specs_1.deviceActionFlow)({
steps: [
{
title: "Please",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: () => "review",
},
{
title: "Origin",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ account }) => account.freshAddress,
},
{
title: "Nonce",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ transaction }) => (transaction.nonce ? transaction.nonce.toFixed() : "0"),
},
{
title: "Fee (uSTX)",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ transaction }) => (transaction.fee ? transaction.fee.toFixed() : "0"),
},
{
title: "Amount uSTX",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ status }) => status.amount.toFixed(),
},
{
title: "To",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ transaction }) => transaction.recipient,
},
{
title: "Memo",
button: specs_1.SpeculosButton.RIGHT,
expectedValue: ({ transaction }) => transaction.memo || "",
},
{
title: "APPROVE",
button: specs_1.SpeculosButton.BOTH,
},
],
});
//# sourceMappingURL=bot-deviceActions.js.map
;