gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 02/02: -update API for latest exchange API


From: gnunet
Subject: [taler-merchant] 02/02: -update API for latest exchange API
Date: Sun, 20 Mar 2022 13:20:31 +0100

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

grothoff pushed a commit to branch master
in repository merchant.

commit abef072191bf1e2507da6027d599cd7aae0b3ea1
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Mar 20 13:20:05 2022 +0100

    -update API for latest exchange API
---
 src/backend/taler-merchant-httpd_reserves.c | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_reserves.c 
b/src/backend/taler-merchant-httpd_reserves.c
index 15c03847..50af145f 100644
--- a/src/backend/taler-merchant-httpd_reserves.c
+++ b/src/backend/taler-merchant-httpd_reserves.c
@@ -169,53 +169,46 @@ try_later (struct Reserve *r)
  * reserve status request to a exchange.
  *
  * @param cls closure with a `struct Reserve *`
- * @param hr HTTP response data
- * @param balance current balance in the reserve, NULL on error
- * @param history_length number of entries in the transaction history, 0 on 
error
- * @param history detailed transaction history, NULL on error
+ * @param rs HTTP response data
  */
 static void
 reserve_cb (void *cls,
-            const struct TALER_EXCHANGE_HttpResponse *hr,
-            const struct TALER_Amount *balance,
-            unsigned int history_length,
-            const struct TALER_EXCHANGE_ReserveHistory *history)
+            const struct TALER_EXCHANGE_ReserveSummary *rs)
 {
   struct Reserve *r = cls;
   enum GNUNET_DB_QueryStatus qs;
 
   r->gh = NULL;
-  if ( (NULL == hr) ||
-       (MHD_HTTP_OK != hr->http_status) )
+  if (MHD_HTTP_OK != rs->hr.http_status)
   {
     try_later (r);
     return;
   }
   if (GNUNET_OK !=
       TALER_amount_cmp_currency (&r->expected_amount,
-                                 balance))
+                                 &rs->details.ok.balance))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Reserve currency disagreement: exchange `%s' has %s, expected 
%s\n",
                 r->exchange_url,
-                balance->currency,
+                rs->details.ok.balance.currency,
                 r->expected_amount.currency);
     free_reserve (r);
     return;
   }
   if (0 !=
       TALER_amount_cmp (&r->expected_amount,
-                        balance))
+                        &rs->details.ok.balance))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Reserve initial balance disagreement: exchange `%s' received 
`%s'\n",
                 r->exchange_url,
-                TALER_amount2s (balance));
+                TALER_amount2s (&rs->details.ok.balance));
   }
   qs = TMH_db->activate_reserve (TMH_db->cls,
                                  r->instance_id,
                                  &r->reserve_pub,
-                                 balance);
+                                 &rs->details.ok.balance);
   if (qs <= 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -226,7 +219,7 @@ reserve_cb (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Reserve activated with initial balance %s\n",
-                TALER_amount2s (balance));
+                TALER_amount2s (&rs->details.ok.balance));
   }
   free_reserve (r);
 }

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