Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Filecoin/bot fixes #1784

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/families/filecoin/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const filecoinSpecs: AppSpec<Transaction> = {
},
mutations: [
{
name: "send 50%~",
name: "Send 50%~",
maxRun: 1,
transaction: ({ account, siblings, bridge }) => {
const sibling = pickSiblings(siblings, 2);
Expand Down Expand Up @@ -51,6 +51,23 @@ const filecoinSpecs: AppSpec<Transaction> = {
};
},
},
{
name: "Transfer Max",
maxRun: 1,
transaction: ({ account, siblings, bridge }) => {
return {
transaction: bridge.createTransaction(account),
updates: [
{
recipient: pickSiblings(siblings, 2).freshAddress,
},
{
useAllAmount: true,
},
],
};
},
},
],
};

Expand Down
14 changes: 4 additions & 10 deletions src/families/filecoin/speculos-deviceActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@ import { formatCurrencyUnit } from "../../currencies";
const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
steps: [
{
title: "To [1/2]",
title: "To",
button: "Rr",
expectedValue: ({ transaction }) => transaction.recipient,
},
{
title: "To [2/2]",
button: "Rr",
},
{
title: "From [1/2]",
button: "Rr",
},
{
title: "From [2/2]",
title: "From",
button: "Rr",
expectedValue: ({ account }) => account.freshAddress,
},
{
title: "Nonce",
Expand Down