aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-20 03:29:05 +0100
committerFlorian Dold <florian@dold.me>2023-02-20 03:29:05 +0100
commitb718885907f4b6126900fcf7c3cce2f0948d6d68 (patch)
tree6f5652df4c6d4d8a5afcaa394bdab2b60ff2755a /packages/taler-wallet-cli
parentd4fda1eea86ef901d125078f1f4fe0fe4a141afb (diff)
wallet cli: single transaction lookup
Mostly used for testing
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/index.ts19
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 d6d780576..30959d9ed 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -420,6 +420,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.",
})