From 0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 15:23:11 +0100 Subject: first refactoring of JSON logic to address #4150 and #4237 --- src/exchange/taler-exchange-httpd_db.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_db.c') diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index 9d04efa9b..e96653a63 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -21,6 +21,8 @@ #include "platform.h" #include #include +#include +#include "taler_json_lib.h" #include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_keystate.h" @@ -1673,12 +1675,12 @@ handle_transaction_data (void *cls, is also ugly if we ever add signatures over this data. (#4135) */ json_array_append (ctx->deposits, json_pack ("{s:o, s:o, s:o, s:I, s:o}", - "deposit_value", TALER_json_from_amount (deposit_value), - "deposit_fee", TALER_json_from_amount (deposit_fee), - "H_contract", TALER_json_from_data (h_contract, + "deposit_value", TALER_JSON_from_amount (deposit_value), + "deposit_fee", TALER_JSON_from_amount (deposit_fee), + "H_contract", GNUNET_JSON_from_data (h_contract, sizeof (struct GNUNET_HashCode)), "transaction_id", (json_int_t) transaction_id, - "coin_pub", TALER_json_from_data (coin_pub, + "coin_pub", GNUNET_JSON_from_data (coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP)))); } -- cgit v1.2.3