taler-typescript-core

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

commit 36a4a6218c86f9c352a3bed4bc51dc54389714be
parent 4b8b967e58e9f692a69d70890cc09ec0fc557eb0
Author: Florian Dold <florian.dold@gmail.com>
Date:   Fri, 13 Sep 2019 02:04:38 +0200

headless wallet: add parameters for test-withdraw subcommand

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

diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts @@ -51,14 +51,21 @@ function applyVerbose(verbose: boolean) { program .command("test-withdraw") + .option( + "-e, --exchange <exchange-url>", + "exchange base URL", + "https://exchange.test.taler.net/", + ) + .option("-a, --amount <withdraw-amt>", "amount to withdraw", "TESTKUDOS:10") + .option("-b, --bank <bank-url>", "bank base URL", "https://bank.test.taler.net/") .description("withdraw test currency from the test bank") - .action(async () => { + .action(async cmdObj => { applyVerbose(program.verbose); console.log("test-withdraw command called"); const wallet = await getDefaultNodeWallet({ persistentStoragePath: walletDbPath, }); - await withdrawTestBalance(wallet); + await withdrawTestBalance(wallet, cmdObj.amount, cmdObj.bank, cmdObj.exchange); process.exit(0); });