diff options
author | Florian Dold <florian@dold.me> | 2023-04-23 22:49:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-23 22:49:42 +0200 |
commit | eff3920bd5a2bff58d66ac72ba8bd2c1577f452f (patch) | |
tree | 1e7435da254b56bb9b8a543ce488aeb84f032ac9 /packages/taler-wallet-cli/src | |
parent | 321252040efdb0712a38b3488297a7a802c5cb59 (diff) | |
download | wallet-core-eff3920bd5a2bff58d66ac72ba8bd2c1577f452f.tar.xz |
wallet-core: further towards deposit DD37
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index cc7c119b9..a31aec2eb 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -386,8 +386,12 @@ walletCli const transactionsCli = walletCli .subcommand("transactions", "transactions", { help: "Manage transactions." }) - .maybeOption("currency", ["--currency"], clk.STRING) - .maybeOption("search", ["--search"], clk.STRING) + .maybeOption("currency", ["--currency"], clk.STRING, { + help: "Filter by currency.", + }) + .maybeOption("search", ["--search"], clk.STRING, { + help: "Filter by search string", + }) .flag("includeRefreshes", ["--include-refreshes"]); // Default action @@ -421,6 +425,36 @@ transactionsCli }); transactionsCli + .subcommand("suspendTransaction", "suspend", { + help: "Suspend a transaction.", + }) + .requiredArgument("transactionId", clk.STRING, { + help: "Identifier of the transaction to suspend.", + }) + .action(async (args) => { + await withWallet(args, async (wallet) => { + await wallet.client.call(WalletApiOperation.SuspendTransaction, { + transactionId: args.suspendTransaction.transactionId, + }); + }); + }); + +transactionsCli + .subcommand("resumeTransaction", "resume", { + help: "Resume a transaction.", + }) + .requiredArgument("transactionId", clk.STRING, { + help: "Identifier of the transaction to suspend.", + }) + .action(async (args) => { + await withWallet(args, async (wallet) => { + await wallet.client.call(WalletApiOperation.ResumeTransaction, { + transactionId: args.resumeTransaction.transactionId, + }); + }); + }); + +transactionsCli .subcommand("lookup", "lookup", { help: "Look up a single transaction based on the transaction identifier.", }) |