exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 342f8cbf12ba2516428ef58d2f00b664f9738639
parent bdff229e8d3a21d70f3326bfebd7ab334bb53647
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 29 Oct 2023 16:15:00 +0100

no more decimal separator

Diffstat:
Msrc/include/taler_util.h | 6------
Msrc/json/json_helper.c | 5-----
Msrc/util/config.c | 17-----------------
Msrc/util/currencies.conf | 10----------
4 files changed, 0 insertions(+), 38 deletions(-)

diff --git a/src/include/taler_util.h b/src/include/taler_util.h @@ -226,12 +226,6 @@ struct TALER_CurrencySpecification char *name; /** - * Character used to separate decimals. String as - * multi-byte sequences may be required (UTF-8!). - */ - char *decimal_separator; - - /** * how many digits the user may enter at most after the @e decimal_separator */ unsigned int num_fractional_input_digits; diff --git a/src/json/json_helper.c b/src/json/json_helper.c @@ -164,7 +164,6 @@ parse_cspec (void *cls, struct TALER_CurrencySpecification *r_cspec = spec->ptr; const char *name; const char *currency; - const char *decimal_separator; uint32_t fid; uint32_t fnd; uint32_t ftzd; @@ -174,8 +173,6 @@ parse_cspec (void *cls, &currency), GNUNET_JSON_spec_string ("name", &name), - GNUNET_JSON_spec_string ("decimal_separator", - &decimal_separator), GNUNET_JSON_spec_uint32 ("num_fractional_input_digits", &fid), GNUNET_JSON_spec_uint32 ("num_fractional_normal_digits", @@ -236,7 +233,6 @@ parse_cspec (void *cls, return GNUNET_SYSERR; } r_cspec->name = GNUNET_strdup (name); - r_cspec->decimal_separator = GNUNET_strdup (decimal_separator); r_cspec->map_alt_unit_names = json_incref ((json_t *) map); return GNUNET_OK; } @@ -256,7 +252,6 @@ clean_cspec (void *cls, (void) cls; GNUNET_free (cspec->name); - GNUNET_free (cspec->decimal_separator); json_decref (cspec->map_alt_unit_names); } diff --git a/src/util/config.c b/src/util/config.c @@ -271,20 +271,6 @@ parse_currencies_cb (void *cls, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cpc->cfg, section, - "DECIMAL_SEPARATOR", - &str)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - section, - "DECIMAL_SEPARATOR"); - cpc->failure = true; - return; - } - cspec->decimal_separator = str; - - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cpc->cfg, - section, "NAME", &str)) { @@ -487,8 +473,6 @@ TALER_CONFIG_currency_specs_to_json (const struct TALER_CurrencySpecification *cspec) { return GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ("decimal_separator", - cspec->decimal_separator), GNUNET_JSON_pack_string ("name", cspec->name), GNUNET_JSON_pack_string ("currency", @@ -515,7 +499,6 @@ TALER_CONFIG_free_currencies ( { struct TALER_CurrencySpecification *cspec = &cspecs[i]; - GNUNET_free (cspec->decimal_separator); GNUNET_free (cspec->name); json_decref (cspec->map_alt_unit_names); } diff --git a/src/util/currencies.conf b/src/util/currencies.conf @@ -2,7 +2,6 @@ ENABLED = YES name = "Euro" code = "EUR" -decimal_separator = "," fractional_input_digits = 2 fractional_normal_digits = 2 fractional_trailing_zero_digits = 2 @@ -13,7 +12,6 @@ alt_unit_names = {"0":"€"} ENABLED = YES name = "Swiss Francs" code = "CHF" -decimal_separator = "." fractional_input_digits = 2 fractional_normal_digits = 2 fractional_trailing_zero_digits = 2 @@ -24,7 +22,6 @@ alt_unit_names = {"0":"Fr.","-2":"Rp."} ENABLED = NO name = "Hungarian Forint" code = "HUF" -decimal_separator = "," fractional_input_digits = 0 fractional_normal_digits = 0 fractional_trailing_zero_digits = 0 @@ -35,7 +32,6 @@ alt_unit_names = {"0":"Ft"} ENABLED = NO name = "US Dollar" code = "USD" -decimal_separator = "." fractional_input_digits = 2 fractional_normal_digits = 2 fractional_trailing_zero_digits = 2 @@ -46,7 +42,6 @@ alt_unit_names = {"0":"$"} ENABLED = YES name = "Kudos (Taler Demonstrator)" code = "KUDOS" -decimal_separator = "," fractional_input_digits = 2 fractional_normal_digits = 2 fractional_trailing_zero_digits = 2 @@ -57,7 +52,6 @@ alt_unit_names = {"0":"ク"} ENABLED = YES name = "Test-kudos (Taler Demonstrator)" code = "TESTKUDOS" -decimal_separator = "." fractional_input_digits = 2 fractional_normal_digits = 2 fractional_trailing_zero_digits = 2 @@ -68,7 +62,6 @@ alt_unit_names = {"0":"テ","3":"kテ","-3":"mテ"} ENABLED = NO name = "Japanese Yen" code = "JPY" -decimal_separator = "." fractional_input_digits = 2 fractional_normal_digits = 0 fractional_trailing_zero_digits = 2 @@ -79,7 +72,6 @@ alt_unit_names = {"0":"¥"} ENABLED = NO name = "Bitcoin (Mainnet)" code = "BITCOINBTC" -decimal_separator = "." fractional_input_digits = 8 fractional_normal_digits = 3 fractional_trailing_zero_digits = 0 @@ -90,10 +82,8 @@ alt_unit_names = {"0":"BTC","-3":"mBTC"} ENABLED = NO name = "WAI-ETHER (Ethereum)" code = "EthereumWAI" -decimal_separator = "." fractional_input_digits = 0 fractional_normal_digits = 0 fractional_trailing_zero_digits = 0 is_currency_name_leading = NO alt_unit_names = {"0":"WAI","3":"KWAI","6":"MWAI","9":"GWAI","12":"Szabo","15":"Finney","18":"Ether","21":"KEther","24":"MEther"} -