summaryrefslogtreecommitdiff
path: root/src/bank-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-15 20:08:38 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-15 20:08:38 +0100
commit4322bbf2f1722b4c53114901768772dabdb7e822 (patch)
treee2193282c2d179f2d3bdf32eb7aca7a6ba161f25 /src/bank-lib
parentd7cfb11fc6a171ece9c233d67ec849ac391bc818 (diff)
downloadexchange-4322bbf2f1722b4c53114901768772dabdb7e822.tar.gz
exchange-4322bbf2f1722b4c53114901768772dabdb7e822.tar.bz2
exchange-4322bbf2f1722b4c53114901768772dabdb7e822.zip
move common logic to parse currency into libtalerutil
Diffstat (limited to 'src/bank-lib')
-rw-r--r--src/bank-lib/Makefile.am1
-rw-r--r--src/bank-lib/taler-fakebank-run.c20
2 files changed, 3 insertions, 18 deletions
diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am
index 729f96e1..282c9db7 100644
--- a/src/bank-lib/Makefile.am
+++ b/src/bank-lib/Makefile.am
@@ -16,6 +16,7 @@ taler_fakebank_run_SOURCES = \
taler-fakebank-run.c
taler_fakebank_run_LDADD = \
libtalerfakebank.la \
+ $(top_builddir)/src/util/libtalerutil.la \
-lgnunetutil
taler_bank_transfer_SOURCES = \
diff --git a/src/bank-lib/taler-fakebank-run.c b/src/bank-lib/taler-fakebank-run.c
index 588777c9..4b94a4bd 100644
--- a/src/bank-lib/taler-fakebank-run.c
+++ b/src/bank-lib/taler-fakebank-run.c
@@ -48,26 +48,10 @@ run (void *cls,
(void) cls;
(void) args;
(void) cfgfile;
- (void) cfg;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
- "taler",
- "CURRENCY",
- &currency_string))
+ TALER_config_get_currency (cfg,
+ &currency_string))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "taler",
- "CURRENCY");
- ret = 1;
- return;
- }
- if (strlen (currency_string) >= TALER_CURRENCY_LEN)
- {
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
- "taler",
- "CURRENCY",
- "Value is too long");
- GNUNET_free (currency_string);
ret = 1;
return;
}