diff options
author | Florian Dold <florian@dold.me> | 2023-02-20 03:29:05 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-20 03:29:05 +0100 |
commit | b718885907f4b6126900fcf7c3cce2f0948d6d68 (patch) | |
tree | 6f5652df4c6d4d8a5afcaa394bdab2b60ff2755a | |
parent | d4fda1eea86ef901d125078f1f4fe0fe4a141afb (diff) |
wallet cli: single transaction lookup
Mostly used for testing
-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 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.", }) |