From fb23045fe1d062cd4f26f3265ac94ded47660abd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 24 Jul 2021 09:12:52 +0200 Subject: implement #6939 transformation --- src/lib/merchant_api_merchant_get_order.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/merchant_api_merchant_get_order.c') diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c index 025460c2..f4dc8131 100644 --- a/src/lib/merchant_api_merchant_get_order.c +++ b/src/lib/merchant_api_merchant_get_order.c @@ -81,7 +81,7 @@ handle_unpaid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, .status = TALER_MERCHANT_OSC_UNPAID }; struct GNUNET_JSON_Specification spec[] = { - TALER_JSON_spec_amount ("total_amount", + TALER_JSON_spec_amount_any ("total_amount", &osr.details.unpaid.contract_amount), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("already_paid_order_id", @@ -182,13 +182,13 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, &osr.details.paid.refund_pending), GNUNET_JSON_spec_bool ("wired", &osr.details.paid.wired), - TALER_JSON_spec_amount ("deposit_total", + TALER_JSON_spec_amount_any ("deposit_total", &osr.details.paid.deposit_total), GNUNET_JSON_spec_uint32 ("exchange_ec", &ec32), GNUNET_JSON_spec_uint32 ("exchange_hc", &hc32), - TALER_JSON_spec_amount ("refund_amount", + TALER_JSON_spec_amount_any ("refund_amount", &osr.details.paid.refund_amount), GNUNET_JSON_spec_json ("contract_terms", (json_t **) &osr.details.paid.contract_terms), @@ -250,7 +250,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, &wt->wtid), TALER_JSON_spec_absolute_time ("execution_time", &wt->execution_time), - TALER_JSON_spec_amount ("amount", + TALER_JSON_spec_amount_any ("amount", &wt->total_amount), GNUNET_JSON_spec_bool ("confirmed", &wt->confirmed), @@ -319,7 +319,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, const json_t *w = json_array_get (refund_details, i); struct GNUNET_JSON_Specification ispec[] = { - TALER_JSON_spec_amount ("amount", + TALER_JSON_spec_amount_any ("amount", &ro->refund_amount), GNUNET_JSON_spec_string ("reason", &ro->reason), -- cgit v1.2.3