Skip to content

Commit

Permalink
feat(aptos): improve bot specs file
Browse files Browse the repository at this point in the history
  • Loading branch information
jccguimaraes committed Dec 30, 2024
1 parent 25061bb commit 8ab2bdb
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions libs/ledger-live-common/src/families/aptos/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const aptos: AppSpec<Transaction> = {
appName: "Aptos",
},
genericDeviceAction: acceptTransaction,
testTimeout: 1000,
// testTimeout: 5 * 60 * 1000,
testTimeout: 5 * 60 * 1000,
minViableAmount: minBalanceNewAccount,
transactionCheck: ({ maxSpendable }) => {
invariant(maxSpendable.gt(minBalanceNewAccount), "balance is too low");
Expand Down Expand Up @@ -59,6 +58,37 @@ const aptos: AppSpec<Transaction> = {
);
},
},
{
name: "Transfer Max",
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;

const transaction = bridge.createTransaction(account);

const updates: Array<Partial<Transaction>> = [
{
recipient,
},
{ amount },
];

return {
transaction,
updates,
};
},
test: ({ account }) => {
botTest("account spendable balance is zero", () =>
expect(account.spendableBalance.toString()).toBe("0"),
);
},
},
],
};

Expand Down

1 comment on commit 8ab2bdb

@github-actions
Copy link

Choose a reason for hiding this comment

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

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 1682ms

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

1 critical spec errors

Spec Aptos failed!

Error: speculos process failure. vnc_server: readall: connection closed

Details of the 0 mutations

Spec Aptos (failed)


Details of the 2 uncovered mutations

Spec Aptos (2)

  • Send ~50%:
  • Transfer Max:
Portfolio ($0.00) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
Aptos (0) 0 ops , 🤷‍♂️ ``

Performance ⏲ 1682ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A
Aptos (0) N/A N/A N/A 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.