aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_wallet_get_tip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_wallet_get_tip.c')
-rw-r--r--src/testing/testing_api_cmd_wallet_get_tip.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/testing/testing_api_cmd_wallet_get_tip.c b/src/testing/testing_api_cmd_wallet_get_tip.c
index 0c19a5b9..f10b8663 100644
--- a/src/testing/testing_api_cmd_wallet_get_tip.c
+++ b/src/testing/testing_api_cmd_wallet_get_tip.c
@@ -77,17 +77,11 @@ struct WalletTipGetState
* expectations.
*
* @param cls closure
- * @param hr HTTP response
- * @param reserve_expiration when the tip reserve will expire
- * @param exchange_url from where to pick up the tip
- * @param amount_remaining how much is remaining
+ * @param whr response
*/
static void
wallet_tip_get_cb (void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr,
- struct GNUNET_TIME_Timestamp reserve_expiration,
- const char *exchange_url,
- const struct TALER_Amount *amount_remaining)
+ const struct TALER_MERCHANT_TipWalletGetResponse *wgr)
{
struct WalletTipGetState *gts = cls;
const struct TALER_TESTING_Command *tip_cmd;
@@ -97,25 +91,27 @@ wallet_tip_get_cb (void *cls,
gts->tip_reference);
gts->tgh = NULL;
- if (gts->http_status != hr->http_status)
+ if (gts->http_status != wgr->hr.http_status)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unexpected response code %u (%d) to command %s\n",
- hr->http_status,
- (int) hr->ec,
+ wgr->hr.http_status,
+ (int) wgr->hr.ec,
TALER_TESTING_interpreter_get_current_label (gts->is));
TALER_TESTING_interpreter_fail (gts->is);
return;
}
- switch (hr->http_status)
+ switch (wgr->hr.http_status)
{
case MHD_HTTP_OK:
if (gts->cmp_amounts)
{
- if ((GNUNET_OK != TALER_amount_cmp_currency (&gts->amount_remaining,
- amount_remaining)) ||
+ if ((GNUNET_OK !=
+ TALER_amount_cmp_currency (&gts->amount_remaining,
+ &wgr->details.success.amount_remaining))
+ ||
(0 != TALER_amount_cmp (&gts->amount_remaining,
- amount_remaining)))
+ &wgr->details.success.amount_remaining)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Amount remaining on tip does not match\n");
@@ -133,7 +129,7 @@ wallet_tip_get_cb (void *cls,
TALER_TESTING_interpreter_fail (gts->is);
if (GNUNET_TIME_timestamp_cmp (*expiration,
!=,
- reserve_expiration))
+ wgr->details.success.expiration))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Tip expiration does not match\n");