diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-03-19 15:23:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-03-19 15:23:11 +0100 |
commit | 0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6 (patch) | |
tree | 0ed4d6f189ed72287a0e003446c87a2b6db70c1a /src/exchange/taler-exchange-httpd_db.c | |
parent | d229f78da3b0b7f851d3541f59651b4f600c879d (diff) | |
download | exchange-0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6.tar.gz exchange-0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6.tar.bz2 exchange-0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6.zip |
first refactoring of JSON logic to address #4150 and #4237
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_db.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 <pthread.h> #include <jansson.h> +#include <gnunet/gnunet_json_lib.h> +#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)))); } |