wallet cli: single transaction lookup

Mostly used for testing
This commit is contained in:
Florian Dold 2023-02-20 03:29:05 +01:00
parent d4fda1eea8
commit b718885907
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -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.",