From 2e819a7d1c4309d9d050164605eb208595b1b1f4 Mon Sep 17 00:00:00 2001 From: Rahul Patni Date: Mon, 18 Nov 2024 12:53:27 -0800 Subject: [PATCH] adds ledger flag to burn command Allows the user to use a ledger device to sign the burn transaction. --- ironfish-cli/src/commands/wallet/burn.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ironfish-cli/src/commands/wallet/burn.ts b/ironfish-cli/src/commands/wallet/burn.ts index 7ebc9d8f7b..d6288e60f7 100644 --- a/ironfish-cli/src/commands/wallet/burn.ts +++ b/ironfish-cli/src/commands/wallet/burn.ts @@ -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 { @@ -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({