Skip to content

Commit

Permalink
fix: update aptos bot test
Browse files Browse the repository at this point in the history
  • Loading branch information
jccguimaraes committed Jan 17, 2025
1 parent cac2ac8 commit a4aacc3
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import type { DeviceAction } from "../../bot/types";
import type { Transaction } from "./types";
import { deviceActionFlow, formatDeviceAmount, SpeculosButton } from "../../bot/specs";
import { State } from "@ledgerhq/coin-framework/bot/types";

export const acceptTransaction: DeviceAction<Transaction, State<Transaction>> = deviceActionFlow({
steps: [
{
title: "Review",
button: SpeculosButton.RIGHT,
},
{
title: "Transaction Type",
button: SpeculosButton.RIGHT,
},
{
title: "Function",
button: SpeculosButton.RIGHT,
},
{
title: "Coin Type",
button: SpeculosButton.RIGHT,
},
{
title: "Receiver (1/2)",
button: SpeculosButton.RIGHT,
},
{
title: "Receiver (2/2)",
button: SpeculosButton.RIGHT,
},
{
title: "Amount",
button: SpeculosButton.RIGHT,
expectedValue: ({ account, status }) =>
formatDeviceAmount(account.currency, status.amount, {
forceFloating: true,
}),
},
{
title: "Gas Fee",
button: SpeculosButton.RIGHT,
},
{
title: "Accept",
button: SpeculosButton.BOTH,
},
],
});

0 comments on commit a4aacc3

Please sign in to comment.