commit 89ed039a8f5b2cd7774bcdf25ff2271bcc03e813
parent 1554073772996cdceb2103f66ca989d323434881
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Tue, 23 Dec 2025 17:55:32 +0100
wallet-cli: withdrawKudos: Cleanup option handling.
Diffstat:
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
@@ -2035,23 +2035,26 @@ testCli
testCli
.subcommand("withdrawKudos", "withdraw-kudos")
.flag("wait", ["--wait"])
- .maybeOption("amount", ["--amount"], clk.AMOUNT, {
+ .requiredOption("amount", ["--amount"], clk.AMOUNT, {
help: "Amount to withdraw (default: 50 KUDOS)",
+ default: "KUDOS:50",
})
- .maybeOption("bank", ["--bank-url"], clk.STRING, {
+ .requiredOption("bank", ["--bank-url"], clk.STRING, {
help: "Bank to use for operations (default: https://bank.demo.taler.net/).",
+ default: "https://bank.demo.taler.net/",
})
- .maybeOption("exchange", ["--exchange-url"], clk.STRING, {
+ .requiredOption("exchange", ["--exchange-url"], clk.STRING, {
help: "Exchange to use for operations (default: https://exchange.demo.taler.net/).",
+ default: "https://exchange.demo.taler.net/",
})
.action(async (args) => {
await withWallet(args, { lazyTaskLoop: true }, async (wallet) => {
const resp = await wallet.client.call(
WalletApiOperation.WithdrawTestBalance,
{
- amount: (args.withdrawKudos.amount ?? "KUDOS:50") as AmountString,
- corebankApiBaseUrl: (args.withdrawKudos.bank ?? "https://bank.demo.taler.net/"),
- exchangeBaseUrl: (args.withdrawKudos.exchange ?? "https://exchange.demo.taler.net/"),
+ amount: args.withdrawKudos.amount as AmountString,
+ corebankApiBaseUrl: args.withdrawKudos.bank,
+ exchangeBaseUrl: args.withdrawKudos.exchange,
},
);
if (args.withdrawKudos.wait) {