diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 3bdb5d350..e4e43808c 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -575,6 +575,10 @@ walletCli help: "Handle a taler:// URI.", }) .maybeArgument("uri", clk.STRING) + .maybeOption("withdrawalExchange", ["--withdrawal-exchange"], clk.STRING, { + help: "Exchange to use for withdrawal operations.", + }) + .maybeOption("restrictAge", ["--restrict-age"], clk.INT) .flag("autoYes", ["-y", "--yes"]) .action(async (args) => { await withWallet(args, async (wallet) => { @@ -616,12 +620,17 @@ walletCli WalletApiOperation.GetWithdrawalDetailsForUri, { talerWithdrawUri: uri, + restrictAge: args.handleUri.restrictAge, }, ); console.log("withdrawInfo", withdrawInfo); - const selectedExchange = withdrawInfo.defaultExchangeBaseUrl; + const selectedExchange = + args.handleUri.withdrawalExchange ?? + withdrawInfo.defaultExchangeBaseUrl; if (!selectedExchange) { - console.error("no suggested exchange!"); + console.error( + "no exchange specified for withdrawal (and no exchange suggested by the bank)", + ); processExit(1); return; }