summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_management_set_wire_fee.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-31 20:27:16 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-31 20:27:16 +0200
commit1d54400a025ff62ad15b77ab117ea5188884b1a1 (patch)
tree195b21644b44a24b84bee159ca0011a1d372a109 /src/lib/exchange_api_management_set_wire_fee.c
parent723a3b742e9b284400c5164d146dc953383b4384 (diff)
downloadexchange-1d54400a025ff62ad15b77ab117ea5188884b1a1.tar.gz
exchange-1d54400a025ff62ad15b77ab117ea5188884b1a1.tar.bz2
exchange-1d54400a025ff62ad15b77ab117ea5188884b1a1.zip
-more eliminations of json_pack
Diffstat (limited to 'src/lib/exchange_api_management_set_wire_fee.c')
-rw-r--r--src/lib/exchange_api_management_set_wire_fee.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/lib/exchange_api_management_set_wire_fee.c b/src/lib/exchange_api_management_set_wire_fee.c
index 6048bf657..075dbbbba 100644
--- a/src/lib/exchange_api_management_set_wire_fee.c
+++ b/src/lib/exchange_api_management_set_wire_fee.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2020 Taler Systems SA
+ Copyright (C) 2020-2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -152,27 +152,21 @@ TALER_EXCHANGE_management_set_wire_fees (
GNUNET_free (swfh);
return NULL;
}
- body = json_pack ("{s:s, s:o, s:o, s:o, s:o, s:o}",
- "wire_method",
- wire_method,
- "master_sig",
- GNUNET_JSON_from_data_auto (master_sig),
- "fee_start",
- GNUNET_JSON_from_time_abs (validity_start),
- "fee_end",
- GNUNET_JSON_from_time_abs (validity_end),
- "closing_fee",
- TALER_JSON_from_amount (closing_fee),
- "wire_fee",
- TALER_JSON_from_amount (wire_fee));
- if (NULL == body)
- {
- GNUNET_break (0);
- GNUNET_free (swfh->url);
- GNUNET_free (swfh);
- return NULL;
- }
+ body = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("wire_method",
+ wire_method),
+ GNUNET_JSON_pack_data_auto ("master_sig",
+ master_sig),
+ GNUNET_JSON_pack_time_abs ("fee_start",
+ validity_start),
+ GNUNET_JSON_pack_time_abs ("fee_end",
+ validity_end),
+ TALER_JSON_pack_amount ("closing_fee",
+ closing_fee),
+ TALER_JSON_pack_amount ("wire_fee",
+ wire_fee));
eh = curl_easy_init ();
+ GNUNET_assert (NULL != eh);
if (GNUNET_OK !=
TALER_curl_easy_post (&swfh->post_ctx,
eh,