aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-09-13 02:04:38 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-09-13 02:04:38 +0200
commit36a4a6218c86f9c352a3bed4bc51dc54389714be (patch)
treea981756caf952c63cd5b1ba1460a35231949988a /src
parent4b8b967e58e9f692a69d70890cc09ec0fc557eb0 (diff)
headless wallet: add parameters for test-withdraw subcommand
Diffstat (limited to 'src')
-rw-r--r--src/headless/taler-wallet-cli.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index ef9030fe5..7d4acb2f8 100644
--- 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);
});