summaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-21 18:36:12 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-21 18:36:12 +0200
commit9160245167ded9b2b7c11716dfa1a1e8887187f4 (patch)
tree64720ebc3b69f84055f25d8a7f309b19b0ebd52a /src/exchange-lib/exchange_api_refund.c
parent922175d3082b138f4973fe11d81327806e68021d (diff)
downloadexchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.tar.gz
exchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.tar.bz2
exchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.zip
make use of GNUNET_JSON_from_data_auto where possible
Diffstat (limited to 'src/exchange-lib/exchange_api_refund.c')
-rw-r--r--src/exchange-lib/exchange_api_refund.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/exchange-lib/exchange_api_refund.c b/src/exchange-lib/exchange_api_refund.c
index a6069f0b4..82ae5e8ab 100644
--- a/src/exchange-lib/exchange_api_refund.c
+++ b/src/exchange-lib/exchange_api_refund.c
@@ -265,18 +265,14 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
" s:o, s:o," /* H_contract, coin_pub */
" s:I, s:I," /* transaction id, rtransaction id */
" s:o, s:o}", /* merchant_pub, merchant_sig */
- "amount", TALER_JSON_from_amount (amount),
- "fee", TALER_JSON_from_amount (amount),
- "H_contract", GNUNET_JSON_from_data (h_contract,
- sizeof (struct GNUNET_HashCode)),
- "coin_pub", GNUNET_JSON_from_data (coin_pub,
- sizeof (*coin_pub)),
+ "refund_amount", TALER_JSON_from_amount (amount),
+ "refund_fee", TALER_JSON_from_amount (amount),
+ "H_contract", GNUNET_JSON_from_data_auto (h_contract),
+ "coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
"transaction_id", (json_int_t) transaction_id,
"rtransaction_id", (json_int_t) rtransaction_id,
- "merchant_pub", GNUNET_JSON_from_data (&rr.merchant,
- sizeof (struct TALER_MerchantPublicKeyP)),
- "merchant_sig", GNUNET_JSON_from_data (&merchant_sig,
- sizeof (merchant_sig))
+ "merchant_pub", GNUNET_JSON_from_data_auto (&rr.merchant),
+ "merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig)
);
rh = GNUNET_new (struct TALER_EXCHANGE_RefundHandle);