From 21e3edd7cd26943a6fbda06e306adecf5a27707f Mon Sep 17 00:00:00 2001
Message-ID: <21e3edd7cd26943a6fbda06e306adecf5a27707f.1766509799.git.h.goebel@crazy-compilers.com>
In-Reply-To: <65a3529cd76b7b1912561ffd1cae2d6d1514aa18.1766509799.git.h.goebel@crazy-compilers.com>
References: <65a3529cd76b7b1912561ffd1cae2d6d1514aa18.1766509799.git.h.goebel@crazy-compilers.com>
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Tue, 23 Dec 2025 17:48:42 +0100
Subject: [PATCH 2/3] wallet-cli: withdrawKudos: Add options to specify bank
 and exchange.

---
 packages/taler-wallet-cli/src/index.ts | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index d6e5370..51261b0 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -2038,14 +2038,20 @@ testCli
   .maybeOption("amount", ["--amount"], clk.AMOUNT, {
     help: "Amount to withdraw (default: 50 KUDOS)",
   })
+  .maybeOption("bank", ["--bank-url"], clk.STRING, {
+    help: "Bank to use for operations (default: https://bank.demo.taler.net/).",
+  })
+  .maybeOption("exchange", ["--exchange-url"], clk.STRING, {
+    help: "Exchange to use for operations (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: "https://bank.demo.taler.net/",
-          exchangeBaseUrl: "https://exchange.demo.taler.net/",
+          corebankApiBaseUrl: (args.withdrawKudos.bank ?? "https://bank.demo.taler.net/"),
+          exchangeBaseUrl: (args.withdrawKudos.exchange ?? "https://exchange.demo.taler.net/"),
         },
       );
       if (args.withdrawKudos.wait) {
-- 
2.41.3

