summaryrefslogtreecommitdiff
path: root/src/exchange-tools/taler-auditor-offline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-tools/taler-auditor-offline.c')
-rw-r--r--src/exchange-tools/taler-auditor-offline.c63
1 files changed, 15 insertions, 48 deletions
diff --git a/src/exchange-tools/taler-auditor-offline.c b/src/exchange-tools/taler-auditor-offline.c
index afde705b..6e37fd9b 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -757,10 +757,7 @@ show_denomkeys (const json_t *denomkeys)
struct GNUNET_TIME_Timestamp stamp_expire_deposit;
struct GNUNET_TIME_Timestamp stamp_expire_legal;
struct TALER_Amount coin_value;
- struct TALER_Amount fee_withdraw;
- struct TALER_Amount fee_deposit;
- struct TALER_Amount fee_refresh;
- struct TALER_Amount fee_refund;
+ struct TALER_DenomFeeSet fees;
struct TALER_MasterSignatureP master_sig;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_denom_pub ("denom_pub",
@@ -768,18 +765,9 @@ show_denomkeys (const json_t *denomkeys)
TALER_JSON_spec_amount ("value",
currency,
&coin_value),
- TALER_JSON_spec_amount ("fee_withdraw",
- currency,
- &fee_withdraw),
- TALER_JSON_spec_amount ("fee_deposit",
- currency,
- &fee_deposit),
- TALER_JSON_spec_amount ("fee_refresh",
- currency,
- &fee_refresh),
- TALER_JSON_spec_amount ("fee_refund",
- currency,
- &fee_refund),
+ TALER_JSON_SPEC_DENOM_FEES ("fee",
+ currency,
+ &fees),
GNUNET_JSON_spec_timestamp ("stamp_start",
&stamp_start),
GNUNET_JSON_spec_timestamp ("stamp_expire_withdraw",
@@ -824,10 +812,7 @@ show_denomkeys (const json_t *denomkeys)
stamp_expire_deposit,
stamp_expire_legal,
&coin_value,
- &fee_withdraw,
- &fee_deposit,
- &fee_refresh,
- &fee_refund,
+ &fees,
&master_pub,
&master_sig))
{
@@ -847,10 +832,10 @@ show_denomkeys (const json_t *denomkeys)
char *deposit_s;
char *legal_s;
- withdraw_fee_s = TALER_amount_to_string (&fee_withdraw);
- deposit_fee_s = TALER_amount_to_string (&fee_deposit);
- refresh_fee_s = TALER_amount_to_string (&fee_refresh);
- refund_fee_s = TALER_amount_to_string (&fee_refund);
+ withdraw_fee_s = TALER_amount_to_string (&fees.withdraw);
+ deposit_fee_s = TALER_amount_to_string (&fees.deposit);
+ refresh_fee_s = TALER_amount_to_string (&fees.refresh);
+ refund_fee_s = TALER_amount_to_string (&fees.refund);
deposit_s = GNUNET_strdup (
GNUNET_TIME_timestamp2s (stamp_expire_deposit));
legal_s = GNUNET_strdup (
@@ -1058,10 +1043,7 @@ sign_denomkeys (const json_t *denomkeys)
struct GNUNET_TIME_Timestamp stamp_expire_deposit;
struct GNUNET_TIME_Timestamp stamp_expire_legal;
struct TALER_Amount coin_value;
- struct TALER_Amount fee_withdraw;
- struct TALER_Amount fee_deposit;
- struct TALER_Amount fee_refresh;
- struct TALER_Amount fee_refund;
+ struct TALER_DenomFeeSet fees;
struct TALER_MasterSignatureP master_sig;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_denom_pub ("denom_pub",
@@ -1069,18 +1051,9 @@ sign_denomkeys (const json_t *denomkeys)
TALER_JSON_spec_amount ("value",
currency,
&coin_value),
- TALER_JSON_spec_amount ("fee_withdraw",
- currency,
- &fee_withdraw),
- TALER_JSON_spec_amount ("fee_deposit",
- currency,
- &fee_deposit),
- TALER_JSON_spec_amount ("fee_refresh",
- currency,
- &fee_refresh),
- TALER_JSON_spec_amount ("fee_refund",
- currency,
- &fee_refund),
+ TALER_JSON_SPEC_DENOM_FEES ("fee",
+ currency,
+ &fees),
GNUNET_JSON_spec_timestamp ("stamp_start",
&stamp_start),
GNUNET_JSON_spec_timestamp ("stamp_expire_withdraw",
@@ -1121,10 +1094,7 @@ sign_denomkeys (const json_t *denomkeys)
stamp_expire_deposit,
stamp_expire_legal,
&coin_value,
- &fee_withdraw,
- &fee_deposit,
- &fee_refresh,
- &fee_refund,
+ &fees,
&master_pub,
&master_sig))
{
@@ -1147,10 +1117,7 @@ sign_denomkeys (const json_t *denomkeys)
stamp_expire_deposit,
stamp_expire_legal,
&coin_value,
- &fee_withdraw,
- &fee_deposit,
- &fee_refresh,
- &fee_refund,
+ &fees,
&auditor_priv,
&auditor_sig);
output_operation (OP_SIGN_DENOMINATION,