gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: taler-wallet-cli: allow excha


From: gnunet
Subject: [taler-wallet-core] branch master updated: taler-wallet-cli: allow exchange selection for handle-uri
Date: Wed, 05 Apr 2023 17:43:11 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 451400b3a taler-wallet-cli: allow exchange selection for handle-uri
451400b3a is described below

commit 451400b3a4a0d22a3b6f00cd7c66cec376bcb991
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Apr 5 17:43:08 2023 +0200

    taler-wallet-cli: allow exchange selection for handle-uri
---
 packages/taler-wallet-cli/src/index.ts | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

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;
             }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]