[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: implement #8449
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: implement #8449 |
Date: |
Thu, 29 Feb 2024 00:00:31 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 3f0bfbeb implement #8449
3f0bfbeb is described below
commit 3f0bfbeb22578f6d2ee699100fd185132fbf1c88
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Feb 28 23:00:13 2024 +0100
implement #8449
---
src/exchange/taler-exchange-httpd.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd.c
b/src/exchange/taler-exchange-httpd.c
index 21f2d080..bc8e76ab 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -164,12 +164,6 @@ struct TALER_Amount TEH_stefan_log;
*/
float TEH_stefan_lin;
-/**
- * Default number of fractional digits to render
- * amounts with.
- */
-unsigned int TEH_currency_fraction_digits;
-
/**
* Our currency.
*/
@@ -2060,6 +2054,11 @@ handle_mhd_request (void *cls,
static enum GNUNET_GenericReturnValue
exchange_serve_process_config (void)
{
+ static struct TALER_CurrencySpecification defspec = {
+ .num_fractional_input_digits = 2,
+ .num_fractional_normal_digits = 2,
+ .num_fractional_trailing_zero_digits = 2
+ };
if (GNUNET_OK !=
TALER_KYCLOGIC_kyc_init (TEH_cfg))
{
@@ -2140,11 +2139,21 @@ exchange_serve_process_config (void)
}
if (NULL == TEH_cspec)
{
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING,
"taler",
"CURRENCY",
- "Lacking enabled currency specification for the
given currency");
- return GNUNET_SYSERR;
+ "Lacking enabled currency specification for the
given currency, using default");
+ defspec.map_alt_unit_names
+ = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("0",
+ TEH_currency)
+ );
+ defspec.name = TEH_currency;
+ GNUNET_assert (strlen (TEH_currency) <
+ sizeof (defspec.currency));
+ strcpy (defspec.currency,
+ TEH_currency);
+ TEH_cspec = &defspec;
}
if (GNUNET_OK !=
TALER_config_get_amount (TEH_cfg,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: implement #8449,
gnunet <=