From b718885907f4b6126900fcf7c3cce2f0948d6d68 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 20 Feb 2023 03:29:05 +0100 Subject: [PATCH] wallet cli: single transaction lookup Mostly used for testing --- packages/taler-wallet-cli/src/index.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index d6d780576..30959d9ed 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -419,6 +419,25 @@ transactionsCli }); }); +transactionsCli + .subcommand("lookup", "lookup", { + help: "Look up a single transaction based on the transaction identifier.", + }) + .requiredArgument("transactionId", clk.STRING, { + help: "Identifier of the transaction to delete", + }) + .action(async (args) => { + await withWallet(args, async (wallet) => { + const tx = await wallet.client.call( + WalletApiOperation.GetTransactionById, + { + transactionId: args.lookup.transactionId, + }, + ); + console.log(j2s(tx)); + }); + }); + transactionsCli .subcommand("abortTransaction", "abort", { help: "Abort a transaction.",