summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-20 13:20:05 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-20 13:20:23 +0100
commitabef072191bf1e2507da6027d599cd7aae0b3ea1 (patch)
tree3ae695f0c718dfe71fe5a417dff433e3aad575f1 /src/backend
parent54ea5367a352f07fb0e41700224cfe5ad8a56444 (diff)
downloadmerchant-abef072191bf1e2507da6027d599cd7aae0b3ea1.tar.gz
merchant-abef072191bf1e2507da6027d599cd7aae0b3ea1.tar.bz2
merchant-abef072191bf1e2507da6027d599cd7aae0b3ea1.zip
-update API for latest exchange API
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_reserves.c25
1 files 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);
}