gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -load wire fees only when needed


From: gnunet
Subject: [taler-exchange] branch master updated: -load wire fees only when needed
Date: Mon, 11 Apr 2022 15:23:35 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new d30b7f8e -load wire fees only when needed
d30b7f8e is described below

commit d30b7f8eeb7ff483e2b7d4e6287d9abf86090b8d
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Mon Apr 11 15:23:25 2022 +0200

    -load wire fees only when needed
---
 contrib/gana                                     |  2 +-
 src/exchange/taler-exchange-httpd_purses_merge.c | 33 ++++++++++++++++--------
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index 702e3252..80d31052 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 702e3252edc8a0fc9bf59d35bf66470342061493
+Subproject commit 80d310529425013bc47d1b9ab36e9b60f3ed4ed0
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c 
b/src/exchange/taler-exchange-httpd_purses_merge.c
index 2121169c..60246337 100644
--- a/src/exchange/taler-exchange-httpd_purses_merge.c
+++ b/src/exchange/taler-exchange-httpd_purses_merge.c
@@ -304,17 +304,6 @@ TEH_handler_purses_merge (
     }
   }
 
-  pcc.wf = TEH_wire_fees_by_time (pcc.exchange_timestamp,
-                                  "sepa"); // FIXME!
-  if (NULL == pcc.wf)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Cannot create purse: global fees not configured!\n");
-    return TALER_MHD_reply_with_error (connection,
-                                       MHD_HTTP_INTERNAL_SERVER_ERROR,
-                                       
TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING,
-                                       NULL);
-  }
   /* Fetch purse details */
   qs = TEH_plugin->select_purse_request (TEH_plugin->cls,
                                          pcc.purse_pub,
@@ -415,6 +404,28 @@ TEH_handler_purses_merge (
     /* we use NULL to represent 'self' as the provider */
     GNUNET_free (pcc.provider_url);
   }
+  else
+  {
+    char *method = GNUNET_strdup ("FIXME");
+
+    /* FIXME: lookup wire method by pcc.provider_url! */
+    pcc.wf = TEH_wire_fees_by_time (pcc.exchange_timestamp,
+                                    method);
+    if (NULL == pcc.wf)
+    {
+      MHD_RESULT res;
+
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  "Cannot merge purse: wire fees not configured!\n");
+      res = TALER_MHD_reply_with_error (connection,
+                                        MHD_HTTP_INTERNAL_SERVER_ERROR,
+                                        
TALER_EC_EXCHANGE_GENERIC_WIRE_FEES_MISSING,
+                                        method);
+      GNUNET_free (method);
+      return res;
+    }
+    GNUNET_free (method);
+  }
   /* check signatures */
   if (GNUNET_OK !=
       TALER_wallet_purse_merge_verify (

-- 
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]