commit 81157c519b31964587548e08171a76c67eea9a2b
parent 1fceb13517106a65c3fb1d7398303e5da0dab77d
Author: Florian Dold <florian@dold.me>
Date: Thu, 12 Jan 2023 11:39:57 +0100
wallet-cli: add subcommand for aborting txns
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
@@ -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
.subcommand("version", "version", {
help: "Show version details.",