aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_handle.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-10-14 00:14:03 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-10-14 00:14:03 +0200
commit8afe2a17f05ce158f854d1be7af8ec058c0da08b (patch)
tree61f7f56ebdf8cbc22bfe9eaac51e1c5e498f034f /src/lib/exchange_api_handle.c
parent3050f902cfc7f36b9c4b45a759cb6dd18e8d4cd1 (diff)
downloadexchange-8afe2a17f05ce158f854d1be7af8ec058c0da08b.tar.xz
make stefan_lin a float, as it should have been in the first place
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r--src/lib/exchange_api_handle.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 811120a85..50a1a9ce9 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -933,9 +933,8 @@ decode_keys_json (const json_t *resp_obj,
"stefan_log",
currency,
&key_data->stefan_log),
- TALER_JSON_spec_amount (
+ GNUNET_JSON_spec_double (
"stefan_lin",
- currency,
&key_data->stefan_lin),
GNUNET_JSON_spec_end ()
};
@@ -1346,10 +1345,11 @@ keys_completed_cb (void *cls,
GNUNET_TIME_timestamp2s (gkh->expire));
if (GNUNET_TIME_absolute_is_past (gkh->expire.abs_time))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Exchange failed to give expiration time, assuming in %s\n",
- GNUNET_TIME_relative2s (DEFAULT_EXPIRATION,
- true));
+ if (MHD_HTTP_OK == response_code)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Exchange failed to give expiration time, assuming in %s\n",
+ GNUNET_TIME_relative2s (DEFAULT_EXPIRATION,
+ true));
gkh->expire
= GNUNET_TIME_absolute_to_timestamp (
GNUNET_TIME_relative_to_absolute (DEFAULT_EXPIRATION));
@@ -1689,7 +1689,7 @@ TALER_EXCHANGE_get_keys (
GNUNET_break (CURLE_OK ==
curl_easy_setopt (eh,
CURLOPT_VERBOSE,
- 0));
+ 1));
GNUNET_break (CURLE_OK ==
curl_easy_setopt (eh,
CURLOPT_TIMEOUT,
@@ -2388,8 +2388,8 @@ TALER_EXCHANGE_keys_to_json (const struct TALER_EXCHANGE_Keys *kd)
&kd->stefan_abs),
TALER_JSON_pack_amount ("stefan_log",
&kd->stefan_log),
- TALER_JSON_pack_amount ("stefan_lin",
- &kd->stefan_lin),
+ GNUNET_JSON_pack_double ("stefan_lin",
+ kd->stefan_lin),
GNUNET_JSON_pack_string ("asset_type",
kd->asset_type),
GNUNET_JSON_pack_data_auto ("master_public_key",