diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-30 17:27:59 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-30 17:27:59 +0200 |
commit | 5ec344290efd937fa82c0704bc7c204a0bf14c78 (patch) | |
tree | 7d9594180bbc7b5fa2b4a8dbe24272e7a82301f3 /src/headless/taler-wallet-cli.ts | |
parent | defbf625bdef0f8a666b72b8ce99de5e01af6b91 (diff) | |
download | wallet-core-5ec344290efd937fa82c0704bc7c204a0bf14c78.tar.xz |
support for tipping protocol changes
Diffstat (limited to 'src/headless/taler-wallet-cli.ts')
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 659cffe67..86eaec64c 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -127,7 +127,7 @@ program }); program - .command("withdraw-url <withdraw-url>") + .command("withdraw-uri <withdraw-uri>") .action(async (withdrawUrl, cmdObj) => { applyVerbose(program.verbose); console.log("withdrawing", withdrawUrl); @@ -166,7 +166,21 @@ program }); program - .command("pay-url <pay-url>") + .command("tip-uri <tip-uri>") + .action(async (tipUri, cmdObj) => { + applyVerbose(program.verbose); + console.log("getting tip", tipUri); + const wallet = await getDefaultNodeWallet({ + persistentStoragePath: walletDbPath, + }); + const res = await wallet.getTipStatus(tipUri); + console.log("tip status", res); + await wallet.acceptTip(tipUri); + wallet.stop(); + }); + +program + .command("pay-uri <pay-uri") .option("-y, --yes", "automatically answer yes to prompts") .action(async (payUrl, cmdObj) => { applyVerbose(program.verbose); |