aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-23 22:49:42 +0200
committerFlorian Dold <florian@dold.me>2023-04-23 22:49:42 +0200
commiteff3920bd5a2bff58d66ac72ba8bd2c1577f452f (patch)
tree1e7435da254b56bb9b8a543ce488aeb84f032ac9 /packages/taler-wallet-cli
parent321252040efdb0712a38b3488297a7a802c5cb59 (diff)
downloadwallet-core-eff3920bd5a2bff58d66ac72ba8bd2c1577f452f.tar.xz
wallet-core: further towards deposit DD37
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/index.ts38
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.",
})