diff options
author | Florian Dold <florian@dold.me> | 2023-01-12 11:39:57 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-01-12 11:39:57 +0100 |
commit | 81157c519b31964587548e08171a76c67eea9a2b (patch) | |
tree | 3f1d0db6cfc7d661b39c96fd77087618cc56e7da /packages/taler-wallet-cli/src/index.ts | |
parent | 1fceb13517106a65c3fb1d7398303e5da0dab77d (diff) | |
download | wallet-core-81157c519b31964587548e08171a76c67eea9a2b.tar.xz |
wallet-cli: add subcommand for aborting txns
Diffstat (limited to 'packages/taler-wallet-cli/src/index.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 90dc2fdd1..4f84bb6c4 100644 --- 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.", |