Skip to content

Commit

Permalink
adds ledger flag to burn command
Browse files Browse the repository at this point in the history
Allows the user to use a ledger device to sign the burn transaction.
  • Loading branch information
patnir committed Nov 18, 2024
1 parent dd1c457 commit 2e819a7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ironfish-cli/src/commands/wallet/burn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ This will destroy tokens and decrease supply for a given asset.`
default: false,
description: 'Wait for the transaction to be confirmed',
}),
ledger: Flags.boolean({
default: false,
description: 'Burn a transaction using a Ledger device',
}),
}

async start(): Promise<void> {
Expand Down Expand Up @@ -221,6 +225,18 @@ This will destroy tokens and decrease supply for a given asset.`

await this.confirm(assetData, amount, raw.fee, account, flags.confirm)

if (flags.ledger) {
await ui.sendTransactionWithLedger(
client,
raw,
account,
flags.watch,
flags.confirm,
this.logger,
)
this.exit(0)
}

ux.action.start('Sending the transaction')

const response = await client.wallet.postTransaction({
Expand Down

0 comments on commit 2e819a7

Please sign in to comment.