more AML_THRESHOLD fixes

This commit is contained in:
Christian Grothoff 2023-05-13 22:08:45 +02:00
parent 89ed38c03c
commit 4e5a9906c2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 10 additions and 10 deletions

View File

@ -303,17 +303,17 @@ parse_aggregator_config (void)
(TALER_amount_is_zero (&currency_round_unit)) ) (TALER_amount_is_zero (&currency_round_unit)) )
{ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Need non-zero amount in section `TALER' under `CURRENCY_ROUND_UNIT'\n"); "Need non-zero amount in section `taler' under `CURRENCY_ROUND_UNIT'\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
if (GNUNET_OK != if (GNUNET_OK !=
TALER_config_get_amount (cfg, TALER_config_get_amount (cfg,
"taler", "exchange",
"AML_THRESHOLD", "AML_THRESHOLD",
&aml_threshold)) &aml_threshold))
{ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Need amount in section `TALER' under `AML_THRESHOLD'\n"); "Need amount in section `exchange' under `AML_THRESHOLD'\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }

View File

@ -1868,6 +1868,13 @@ exchange_serve_process_config (void)
"Need amount in section `exchange' under `AML_THRESHOLD'\n"); "Need amount in section `exchange' under `AML_THRESHOLD'\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
if (0 != strcmp (TEH_currency,
TEH_aml_threshold.currency))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Amount in section `exchange' under `AML_THRESHOLD' uses the wrong currency!\n");
return GNUNET_SYSERR;
}
TEH_enable_tipping TEH_enable_tipping
= GNUNET_CONFIGURATION_get_value_yesno ( = GNUNET_CONFIGURATION_get_value_yesno (
TEH_cfg, TEH_cfg,
@ -1879,13 +1886,6 @@ exchange_serve_process_config (void)
"Need YES or NO in section `exchange' under `ENABLE_TIPPING'\n"); "Need YES or NO in section `exchange' under `ENABLE_TIPPING'\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
if (0 != strcmp (TEH_currency,
TEH_aml_threshold.currency))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Amount in section `TALER' under `AML_THRESHOLD' uses the wrong currency!\n");
return GNUNET_SYSERR;
}
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (TEH_cfg, GNUNET_CONFIGURATION_get_value_string (TEH_cfg,
"exchange", "exchange",