diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-08-21 23:58:37 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-08-21 23:58:37 +0200 |
commit | 373d9df0d6c3448ae8d72071ba96f7e3f45b4272 (patch) | |
tree | d2bf5cb887422e75e1f8140d892d687dd33226ad /src/lib/exchange_api_handle.c | |
parent | 250e1997d86c160e1a6603c72b23bf1ec8eafb5d (diff) |
improve logging, fix client-side serialization of new /keys options
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r-- | src/lib/exchange_api_handle.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 9c5e12785..3fe45ede8 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -789,11 +789,21 @@ decode_keys_json (const json_t *resp_obj, NULL), GNUNET_JSON_spec_end () }; + const char *emsg; + unsigned int eline; - EXITIF (GNUNET_OK != - GNUNET_JSON_parse (resp_obj, - (check_sig) ? mspec : &mspec[2], - NULL, NULL)); + if (GNUNET_OK != + GNUNET_JSON_parse (resp_obj, + (check_sig) ? mspec : &mspec[2], + &emsg, + &eline)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Parsing /keys failed for `%s' (%u)\n", + emsg, + eline); + EXITIF (1); + } { struct GNUNET_JSON_Specification sspec[] = { TALER_JSON_spec_amount ( @@ -2240,6 +2250,14 @@ TALER_EXCHANGE_keys_to_json (const struct TALER_EXCHANGE_Keys *kd) kd->version), GNUNET_JSON_pack_string ("currency", kd->currency), + GNUNET_JSON_pack_uint64 ("currency_fraction_digits", + kd->currency_fraction_digits), + TALER_JSON_pack_amount ("stefan_abs", + &kd->stefan_abs), + TALER_JSON_pack_amount ("stefan_log", + &kd->stefan_log), + TALER_JSON_pack_amount ("stefan_lin", + &kd->stefan_lin), GNUNET_JSON_pack_string ("asset_type", kd->asset_type), GNUNET_JSON_pack_data_auto ("master_public_key", |