wallet-cli: add subcommand for aborting txns

This commit is contained in:
Florian Dold 2023-01-12 11:39:57 +01:00
parent 1fceb13517
commit 81157c519b
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -330,6 +330,25 @@ transactionsCli
}); });
}); });
transactionsCli
.subcommand("abortTransaction", "delete", {
help: "Abort a transaction.",
})
.requiredArgument("transactionId", clk.STRING, {
help: "Identifier of the transaction to delete",
})
.flag("force", ["--force"], {
help: "Force aborting the transaction. Might lose money."
})
.action(async (args) => {
await withWallet(args, async (wallet) => {
await wallet.client.call(WalletApiOperation.AbortTransaction, {
transactionId: args.abortTransaction.transactionId,
forceImmediateAbort: args.abortTransaction.force,
});
});
});
walletCli walletCli
.subcommand("version", "version", { .subcommand("version", "version", {
help: "Show version details.", help: "Show version details.",