move currency to taler section, create taler.conf

This commit is contained in:
Florian Dold 2016-04-19 23:40:47 +02:00
parent f9d4a96715
commit e01143daf3
8 changed files with 19 additions and 13 deletions

View File

@ -15,6 +15,10 @@ if WALLET_ONLY
SUBDIRS = include util SUBDIRS = include util
else else
pkgcfgdir = $(prefix)/share/taler/config.d/
pkgcfg_DATA = \
taler.conf
SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools
if HAVE_LIBCURL if HAVE_LIBCURL
SUBDIRS += exchange-lib SUBDIRS += exchange-lib

View File

@ -4,10 +4,12 @@
# Persistant data storage for the testcase # Persistant data storage for the testcase
TALER_TEST_HOME = test_exchange_api_home/ TALER_TEST_HOME = test_exchange_api_home/
[exchange] [taler]
# Currency supported by the exchange (can only be one) # Currency supported by the exchange (can only be one)
CURRENCY = EUR CURRENCY = EUR
[exchange]
# Wire format supported by the exchange # Wire format supported by the exchange
# We use 'test' for testing of the actual # We use 'test' for testing of the actual
# coin operations, and 'sepa' to test SEPA-specific routines. # coin operations, and 'sepa' to test SEPA-specific routines.

View File

@ -1,8 +1,6 @@
# This file is in the public domain. # This file is in the public domain.
# #
[exchange] [exchange]
# Currency supported by the exchange (can only be one)
# CURRENCY = EUR
# Where do we store the private keys the exchange needs at # Where do we store the private keys the exchange needs at
# runtime? (Denomination and signing keys are then stored # runtime? (Denomination and signing keys are then stored

View File

@ -2,11 +2,13 @@
# Persistant data storage for the testcase # Persistant data storage for the testcase
TALER_TEST_HOME = test_taler_exchange_httpd_home/ TALER_TEST_HOME = test_taler_exchange_httpd_home/
[taler]
[exchange]
# Currency supported by the exchange (can only be one) # Currency supported by the exchange (can only be one)
CURRENCY = EUR CURRENCY = EUR
[exchange]
# Wire format supported by the exchange # Wire format supported by the exchange
# We use 'test' for testing of the actual # We use 'test' for testing of the actual
# coin operations. # coin operations.

View File

@ -737,12 +737,12 @@ libtaler_plugin_wire_sepa_init (void *cls)
{ {
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange", "taler",
"CURRENCY", "CURRENCY",
&sc->currency)) &sc->currency))
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange", "taler",
"CURRENCY"); "CURRENCY");
GNUNET_free (sc); GNUNET_free (sc);
return NULL; return NULL;

View File

@ -242,12 +242,12 @@ libtaler_plugin_wire_template_init (void *cls)
} }
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange", "taler",
"CURRENCY", "CURRENCY",
&tc->currency)) &tc->currency))
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange", "taler",
"CURRENCY"); "CURRENCY");
GNUNET_free (tc->bank_uri); GNUNET_free (tc->bank_uri);
GNUNET_free (tc); GNUNET_free (tc);

View File

@ -224,7 +224,7 @@ test_amount_round (void *cls,
if (NULL == tc->currency) if (NULL == tc->currency)
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange", "taler",
"CURRENCY"); "CURRENCY");
return GNUNET_SYSERR; /* not configured with currency */ return GNUNET_SYSERR; /* not configured with currency */
} }
@ -820,12 +820,12 @@ libtaler_plugin_wire_test_init (void *cls)
} }
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange", "taler",
"CURRENCY", "CURRENCY",
&tc->currency)) &tc->currency))
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange", "taler",
"CURRENCY"); "CURRENCY");
GNUNET_free (tc->bank_uri); GNUNET_free (tc->bank_uri);
GNUNET_free (tc); GNUNET_free (tc);

View File

@ -17,5 +17,5 @@ SEPA_RESPONSE_FILE = test_wire_plugin_sepa.json
# is avaialble). # is avaialble).
BANK_URI = http://localhost/ BANK_URI = http://localhost/
[exchange] [taler]
CURRENCY = "EUR" CURRENCY = "EUR"