taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 604a74007d559258e6630144a6293c351735d15d
parent 82591a9ba9751336480ab429886c085786172ec4
Author: Florian Dold <florian.dold@gmail.com>
Date:   Wed,  4 Sep 2019 14:28:22 +0200

rudimentary history command

Diffstat:
Msrc/headless/taler-wallet-cli.ts | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git 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<void> { return new Promise<void>((resolve, reject) => { setTimeout(() => resolve(), milliSeconds);