[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: improve logging, fix client-side
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: improve logging, fix client-side serialization of new /keys options |
Date: |
Mon, 21 Aug 2023 23:58:42 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 373d9df0 improve logging, fix client-side serialization of new /keys
options
373d9df0 is described below
commit 373d9df0d6c3448ae8d72071ba96f7e3f45b4272
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 21 23:58:37 2023 +0200
improve logging, fix client-side serialization of new /keys options
---
src/exchange/taler-exchange-httpd_keys.c | 6 ++----
src/lib/exchange_api_handle.c | 26 ++++++++++++++++++++++----
2 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_keys.c
b/src/exchange/taler-exchange-httpd_keys.c
index 0bb5c813..ef12609a 100644
--- a/src/exchange/taler-exchange-httpd_keys.c
+++ b/src/exchange/taler-exchange-httpd_keys.c
@@ -2535,11 +2535,9 @@ create_krd (struct TEH_KeyStateHandle *ksh,
&TEH_stefan_lin),
GNUNET_JSON_pack_string ("asset_type",
asset_type),
- // FIXME: legacy, remove soon!
- GNUNET_JSON_pack_bool ("tipping_allowed",
- GNUNET_YES == TEH_enable_rewards),
GNUNET_JSON_pack_bool ("rewards_allowed",
- GNUNET_YES == TEH_enable_rewards),
+ GNUNET_YES ==
+ TEH_enable_rewards),
GNUNET_JSON_pack_data_auto ("master_public_key",
&TEH_master_public_key),
GNUNET_JSON_pack_time_rel ("reserve_closing_delay",
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 9c5e1278..3fe45ede 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",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: improve logging, fix client-side serialization of new /keys options,
gnunet <=