aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_management_set_wire_fee.c11
-rw-r--r--src/lib/exchange_api_wire.c20
2 files changed, 19 insertions, 12 deletions
diff --git a/src/lib/exchange_api_management_set_wire_fee.c b/src/lib/exchange_api_management_set_wire_fee.c
index 807c6723a..cd32a4833 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-2021 Taler Systems SA
+ Copyright (C) 2020-2022 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
@@ -129,8 +129,7 @@ TALER_EXCHANGE_management_set_wire_fees (
const char *wire_method,
struct GNUNET_TIME_Timestamp validity_start,
struct GNUNET_TIME_Timestamp validity_end,
- const struct TALER_Amount *wire_fee,
- const struct TALER_Amount *closing_fee,
+ const struct TALER_WireFeeSet *fees,
const struct TALER_MasterSignatureP *master_sig,
TALER_EXCHANGE_ManagementWireEnableCallback cb,
void *cb_cls)
@@ -163,9 +162,11 @@ TALER_EXCHANGE_management_set_wire_fees (
GNUNET_JSON_pack_timestamp ("fee_end",
validity_end),
TALER_JSON_pack_amount ("closing_fee",
- closing_fee),
+ &fees->closing),
+ TALER_JSON_pack_amount ("wad_fee",
+ &fees->wad),
TALER_JSON_pack_amount ("wire_fee",
- wire_fee));
+ &fees->wire));
eh = TALER_EXCHANGE_curl_easy_get_ (swfh->url);
GNUNET_assert (NULL != eh);
if (GNUNET_OK !=
diff --git a/src/lib/exchange_api_wire.c b/src/lib/exchange_api_wire.c
index 453b576b1..0390623fa 100644
--- a/src/lib/exchange_api_wire.c
+++ b/src/lib/exchange_api_wire.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2020 Taler Systems SA
+ Copyright (C) 2014-2022 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
@@ -144,9 +144,11 @@ parse_fees (json_t *fees)
GNUNET_JSON_spec_fixed_auto ("sig",
&wa->master_sig),
TALER_JSON_spec_amount_any ("wire_fee",
- &wa->wire_fee),
+ &wa->fees.wire),
+ TALER_JSON_spec_amount_any ("wad_fee",
+ &wa->fees.wad),
TALER_JSON_spec_amount_any ("closing_fee",
- &wa->closing_fee),
+ &wa->fees.closing),
GNUNET_JSON_spec_timestamp ("start_date",
&wa->start_date),
GNUNET_JSON_spec_timestamp ("end_date",
@@ -230,8 +232,10 @@ handle_wire_finished (void *cls,
struct FeeMap *fm;
const struct TALER_EXCHANGE_Keys *key_state;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_json ("accounts", &accounts),
- GNUNET_JSON_spec_json ("fees", &fees),
+ GNUNET_JSON_spec_json ("accounts",
+ &accounts),
+ GNUNET_JSON_spec_json ("fees",
+ &fees),
GNUNET_JSON_spec_end ()
};
@@ -277,8 +281,10 @@ handle_wire_finished (void *cls,
struct TALER_EXCHANGE_WireAccount *wa = &was[i];
json_t *account;
struct GNUNET_JSON_Specification spec_account[] = {
- GNUNET_JSON_spec_string ("payto_uri", &wa->payto_uri),
- GNUNET_JSON_spec_fixed_auto ("master_sig", &wa->master_sig),
+ GNUNET_JSON_spec_string ("payto_uri",
+ &wa->payto_uri),
+ GNUNET_JSON_spec_fixed_auto ("master_sig",
+ &wa->master_sig),
GNUNET_JSON_spec_end ()
};
char *method;