From 604a74007d559258e6630144a6293c351735d15d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 4 Sep 2019 14:28:22 +0200 Subject: rudimentary history command --- src/headless/taler-wallet-cli.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index da68f46ae..f10346369 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -77,6 +77,22 @@ program process.exit(0); }); + +program + .command("history") + .description("show wallet history") + .action(async () => { + applyVerbose(program.verbose); + console.log("history command called"); + const wallet = await getDefaultNodeWallet({ + persistentStoragePath: walletDbPath, + }); + console.log("got wallet"); + const history = await wallet.getHistory(); + console.log(JSON.stringify(history, undefined, 2)); + process.exit(0); + }); + async function asyncSleep(milliSeconds: number): Promise { return new Promise((resolve, reject) => { setTimeout(() => resolve(), milliSeconds); -- cgit v1.2.3