aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-09-04 14:28:22 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-09-04 14:28:22 +0200
commit604a74007d559258e6630144a6293c351735d15d (patch)
tree4cdc40abcf24f2ed360d8580388e2e177d13eca9 /src
parent82591a9ba9751336480ab429886c085786172ec4 (diff)
rudimentary history command
Diffstat (limited to 'src')
-rw-r--r--src/headless/taler-wallet-cli.ts16
1 files changed, 16 insertions, 0 deletions
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<void> {
return new Promise<void>((resolve, reject) => {
setTimeout(() => resolve(), milliSeconds);