gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: adapt to latest exchange API cha


From: gnunet
Subject: [taler-merchant] branch master updated: adapt to latest exchange API changes
Date: Mon, 03 Jul 2023 17:25:59 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 6391fb92 adapt to latest exchange API changes
6391fb92 is described below

commit 6391fb92a27b3c0f650e8d163fc4c1152b28ac09
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 3 17:25:54 2023 +0200

    adapt to latest exchange API changes
---
 ...r-merchant-httpd_private-get-instances-ID-kyc.c | 36 ++++++++--------------
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c 
b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
index 5e229b48..7c2f7a2c 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
@@ -73,7 +73,7 @@ struct ExchangeKycRequest
   /**
    * Find operation where we connect to the respective exchange.
    */
-  struct TMH_EXCHANGES_FindOperation *fo;
+  struct TMH_EXCHANGES_Find2Operation *fo;
 
   /**
    * KYC request this exchange request is made for.
@@ -278,7 +278,7 @@ kyc_context_cleanup (void *cls)
     }
     if (NULL != ekr->fo)
     {
-      TMH_EXCHANGES_find_exchange_cancel (ekr->fo);
+      TMH_EXCHANGES_keys4exchange_cancel (ekr->fo);
       ekr->fo = NULL;
     }
     GNUNET_free (ekr->exchange_url);
@@ -395,7 +395,7 @@ handle_kyc_timeout (void *cls)
     }
     if (NULL != ekr->fo)
     {
-      TMH_EXCHANGES_find_exchange_cancel (ekr->fo);
+      TMH_EXCHANGES_keys4exchange_cancel (ekr->fo);
       ekr->fo = NULL;
     }
     GNUNET_assert (
@@ -649,47 +649,36 @@ exchange_check_cb (void *cls,
  * operation.  Runs the KYC check against the exchange.
  *
  * @param cls closure with our `struct ExchangeKycRequest *`
- * @param hr HTTP response details
- * @param eh handle to the exchange context
- * @param ih internal handle to the exchange
+ * @param keys keys of the exchange context
  */
 static void
 kyc_with_exchange (void *cls,
-                   const struct TALER_EXCHANGE_HttpResponse *hr,
-                   struct TALER_EXCHANGE_Handle *eh,
-                   struct TMH_Exchange *ih)
+                   struct TALER_EXCHANGE_Keys *keys)
 {
   struct ExchangeKycRequest *ekr = cls;
   struct KycContext *kc = ekr->kc;
   struct TALER_PaytoHashP h_payto;
 
-  (void) ih;
   ekr->fo = NULL;
-  if (MHD_HTTP_OK != hr->http_status)
+  if (NULL == keys)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Exchange responded with HTTP status %u (%d) to /kyc-check 
request!\n",
-                hr->http_status,
-                hr->ec);
     kc->response_code = MHD_HTTP_BAD_GATEWAY;
     GNUNET_assert (
       0 ==
       json_array_append_new (
         kc->timeout_kycs,
         GNUNET_JSON_PACK (
-          GNUNET_JSON_pack_string ("exchange_url",
-                                   ekr->exchange_url),
-          GNUNET_JSON_pack_uint64 ("exchange_code",
-                                   hr->ec),
-          GNUNET_JSON_pack_uint64 ("exchange_http_status",
-                                   hr->http_status))));
+          TALER_JSON_pack_ec (
+            TALER_EC_MERCHANT_GENERIC_EXCHANGE_KEYS_FAILURE))));
     ekr_finished (ekr);
     return;
   }
   TALER_payto_hash (ekr->payto_uri,
                     &h_payto);
   ekr->kyc = TALER_EXCHANGE_kyc_check (
-    eh,
+    merchant_curl_ctx,
+    ekr->exchange_url,
+    keys,
     ekr->exchange_kyc_serial,
     &h_payto,
     ekr->kc->mi->settings.ut,
@@ -748,8 +737,7 @@ kyc_status_cb (void *cls,
   ekr->payto_uri = GNUNET_strdup (payto_uri);
   ekr->last_check = last_check;
   ekr->kc = kc;
-  ekr->fo = TMH_EXCHANGES_find_exchange (exchange_url,
-                                         false,
+  ekr->fo = TMH_EXCHANGES_keys4exchange (exchange_url,
                                          &kyc_with_exchange,
                                          ekr);
 }

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