Skip to content

Commit

Permalink
test: update bot test
Browse files Browse the repository at this point in the history
  • Loading branch information
jccguimaraes committed Jan 27, 2025
1 parent f720908 commit 3c2ea5b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions libs/coin-modules/coin-aptos/src/test/bot-specs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import invariant from "invariant";
// import invariant from "invariant";
import { DeviceModelId } from "@ledgerhq/devices";
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
import { parseCurrencyUnit } from "@ledgerhq/coin-framework/currencies/index";
Expand All @@ -21,18 +21,16 @@ const aptos: AppSpec<Transaction> = {
genericDeviceAction: acceptTransaction,
testTimeout: 5 * 60 * 1000,
minViableAmount: minBalanceNewAccount,
transactionCheck: ({ maxSpendable }) => {
invariant(maxSpendable.gt(minBalanceNewAccount), "balance is too low");
},
// transactionCheck: ({ maxSpendable }) => {
// invariant(maxSpendable.gt(minBalanceNewAccount), "balance is too low");
// },
mutations: [
{
name: "Send ~50%",
feature: "send",
maxRun: 1,
testDestination: genericTestDestination,
transaction: ({ account, siblings, bridge, maxSpendable }) => {
invariant(maxSpendable.gt(minBalanceNewAccount), "balance is too low");

const sibling = pickSiblings(siblings, maxAccountSiblings);
const recipient = sibling.freshAddress;
const amount = maxSpendable.div(2).integerValue();
Expand Down Expand Up @@ -62,9 +60,7 @@ const aptos: AppSpec<Transaction> = {
name: "Send max",
maxRun: 2,
testDestination: genericTestDestination,
transaction: ({ account, siblings, bridge, maxSpendable }) => {
invariant(maxSpendable.gt(minBalanceNewAccount), "balance is too low");

transaction: ({ account, siblings, bridge }) => {
const sibling = pickSiblings(siblings, maxAccountSiblings);
const recipient = sibling.freshAddress;

Expand Down

1 comment on commit 3c2ea5b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Bot] Testing with 'Nitrogen' 💰 1 miss funds ($4.28) ⏲ 3.8s

💰 1 specs may miss funds: Aptos

What is the bot and how does it work? Everything is documented here!

⚠️ 1 spec hints
  • Spec Aptos:
    • No mutation were found possible. Yet there are funds in the accounts, please investigate.
Details of the 0 mutations

Spec Aptos (2)

Spec Aptos found 2 Aptos accounts. Will use Aptos 0.6.10 on nanoSP 1.1.2
undefined: 0.573619 APT (1ops) (0xc9ce406c17508f44ed2f1dbd62e0a0363a4335afe2e77dd9d174fffb346293be on 44'/637'/0'/0/0) #0 js:2:aptos:11fd81d9637768b091212591ba1090840b14d3349265e9ea734657c14a0f0b49:
undefined: 0 APT (0ops) (0x4a0939b013ec25060d431f21f1e21a332d03cd3361ba478f86daa541ff176556 on 44'/637'/1'/0/0) #1 js:2:aptos:6e66925078c1e3c2c59078c9292aa9a77ffeb2358e55f709c6184e12f23a123f:

Portfolio ($4.28) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
Aptos (2) 1 ops , 0.573619 APT ($4.28) 0xc9ce406c17508f44ed2f1dbd62e0a0363a4335afe2e77dd9d174fffb346293be
undefined: 0.573619 APT (1ops) (0xc9ce406c17508f44ed2f1dbd62e0a0363a4335afe2e77dd9d174fffb346293be on 44'/637'/0'/0/0) #0 js:2:aptos:11fd81d9637768b091212591ba1090840b14d3349265e9ea734657c14a0f0b49:
undefined: 0 APT (0ops) (0x4a0939b013ec25060d431f21f1e21a332d03cd3361ba478f86daa541ff176556 on 44'/637'/1'/0/0) #1 js:2:aptos:6e66925078c1e3c2c59078c9292aa9a77ffeb2358e55f709c6184e12f23a123f:
Performance ⏲ 3.8s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 1.12ms 1749ms 0.40ms N/A N/A N/A N/A N/A
Aptos (1) 1.12ms 1749ms 0.40ms N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Please sign in to comment.