headless wallet: add parameters for test-withdraw subcommand
This commit is contained in:
parent
4b8b967e58
commit
36a4a6218c
@ -51,14 +51,21 @@ function applyVerbose(verbose: boolean) {
|
|||||||
|
|
||||||
program
|
program
|
||||||
.command("test-withdraw")
|
.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")
|
.description("withdraw test currency from the test bank")
|
||||||
.action(async () => {
|
.action(async cmdObj => {
|
||||||
applyVerbose(program.verbose);
|
applyVerbose(program.verbose);
|
||||||
console.log("test-withdraw command called");
|
console.log("test-withdraw command called");
|
||||||
const wallet = await getDefaultNodeWallet({
|
const wallet = await getDefaultNodeWallet({
|
||||||
persistentStoragePath: walletDbPath,
|
persistentStoragePath: walletDbPath,
|
||||||
});
|
});
|
||||||
await withdrawTestBalance(wallet);
|
await withdrawTestBalance(wallet, cmdObj.amount, cmdObj.bank, cmdObj.exchange);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user