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