diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-01-19 20:57:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-01-19 20:57:32 +0100 |
commit | 4fac247bc7187cd611daad87563396c06a8295e4 (patch) | |
tree | 25965fa06ace4886f07c997a2b9ea47f10101d1b /src/auditor/taler-auditor.c | |
parent | 6f3c6827221fae6da47a113af4172e8f269bd38c (diff) | |
download | exchange-4fac247bc7187cd611daad87563396c06a8295e4.tar.xz |
use TALER_config_get_amount() consistently, require currency rounding option to exist instead of defaulting
Diffstat (limited to 'src/auditor/taler-auditor.c')
-rw-r--r-- | src/auditor/taler-auditor.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c index 6752b34ab..d2bd8de6d 100644 --- a/src/auditor/taler-auditor.c +++ b/src/auditor/taler-auditor.c @@ -5258,28 +5258,14 @@ run (void *cls, return; } { - char *rounding_str; if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "taler", - "CURRENCY_ROUND_UNIT", - &rounding_str)) - { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n"); - GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (currency, - ¤cy_round_unit)); - currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100; - } - else if (GNUNET_OK != - TALER_string_to_amount (rounding_str, - ¤cy_round_unit)) + TALER_config_get_amount (cfg, + "taler", + "CURRENCY_ROUND_UNIT", + ¤cy_round_unit)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Invalid amount `%s' specified in `TALER' under `CURRENCY_ROUND_UNIT'\n", - rounding_str); - GNUNET_free (rounding_str); + "Invalid or missing amount in `TALER' under `CURRENCY_ROUND_UNIT'\n"); global_ret = 1; return; } |