aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-tools')
-rw-r--r--src/exchange-tools/taler-auditor-offline.c22
-rw-r--r--src/exchange-tools/taler-exchange-offline.c24
2 files changed, 46 insertions, 0 deletions
diff --git a/src/exchange-tools/taler-auditor-offline.c b/src/exchange-tools/taler-auditor-offline.c
index 7b6d0a893..33743bb3a 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -98,6 +98,11 @@ static json_t *in;
*/
static json_t *out;
+/**
+ * Currency supported by this auditor.
+ */
+static char *currency;
+
/**
* A subcommand supported by this program.
@@ -749,14 +754,19 @@ show_denomkeys (const json_t *denomkeys)
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_pub.rsa_public_key),
TALER_JSON_spec_amount ("value",
+ currency,
&coin_value),
TALER_JSON_spec_amount ("fee_withdraw",
+ currency,
&fee_withdraw),
TALER_JSON_spec_amount ("fee_deposit",
+ currency,
&fee_deposit),
TALER_JSON_spec_amount ("fee_refresh",
+ currency,
&fee_refresh),
TALER_JSON_spec_amount ("fee_refund",
+ currency,
&fee_refund),
GNUNET_JSON_spec_absolute_time ("stamp_start",
&stamp_start),
@@ -1044,14 +1054,19 @@ sign_denomkeys (const json_t *denomkeys)
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_pub.rsa_public_key),
TALER_JSON_spec_amount ("value",
+ currency,
&coin_value),
TALER_JSON_spec_amount ("fee_withdraw",
+ currency,
&fee_withdraw),
TALER_JSON_spec_amount ("fee_deposit",
+ currency,
&fee_deposit),
TALER_JSON_spec_amount ("fee_refresh",
+ currency,
&fee_refresh),
TALER_JSON_spec_amount ("fee_refund",
+ currency,
&fee_refund),
GNUNET_JSON_spec_absolute_time ("stamp_start",
&stamp_start),
@@ -1347,6 +1362,13 @@ run (void *cls,
{
kcfg = cfg;
if (GNUNET_OK !=
+ TALER_config_get_currency (kcfg,
+ &currency))
+ {
+ global_ret = 1;
+ return;
+ }
+ if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (kcfg,
"auditor",
"BASE_URL",
diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c
index 6164a8103..79b8dd478 100644
--- a/src/exchange-tools/taler-exchange-offline.c
+++ b/src/exchange-tools/taler-exchange-offline.c
@@ -134,6 +134,11 @@ static json_t *in;
*/
static json_t *out;
+/**
+ * Currency we have configured.
+ */
+static char *currency;
+
/**
* A subcommand supported by this program.
@@ -1424,8 +1429,10 @@ upload_wire_fee (const char *exchange_url,
GNUNET_JSON_spec_string ("wire_method",
&wire_method),
TALER_JSON_spec_amount ("wire_fee",
+ currency,
&wire_fee),
TALER_JSON_spec_amount ("closing_fee",
+ currency,
&closing_fee),
GNUNET_JSON_spec_absolute_time ("start_time",
&start_time),
@@ -2590,14 +2597,19 @@ show_denomkeys (const struct TALER_SecurityModulePublicKeyP *secm_pub,
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_pub.rsa_public_key),
TALER_JSON_spec_amount ("value",
+ currency,
&coin_value),
TALER_JSON_spec_amount ("fee_withdraw",
+ currency,
&fee_withdraw),
TALER_JSON_spec_amount ("fee_deposit",
+ currency,
&fee_deposit),
TALER_JSON_spec_amount ("fee_refresh",
+ currency,
&fee_refresh),
TALER_JSON_spec_amount ("fee_refund",
+ currency,
&fee_refund),
GNUNET_JSON_spec_absolute_time ("stamp_start",
&stamp_start),
@@ -3004,14 +3016,19 @@ sign_denomkeys (const struct TALER_SecurityModulePublicKeyP *secm_pub,
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_pub.rsa_public_key),
TALER_JSON_spec_amount ("value",
+ currency,
&coin_value),
TALER_JSON_spec_amount ("fee_withdraw",
+ currency,
&fee_withdraw),
TALER_JSON_spec_amount ("fee_deposit",
+ currency,
&fee_deposit),
TALER_JSON_spec_amount ("fee_refresh",
+ currency,
&fee_refresh),
TALER_JSON_spec_amount ("fee_refund",
+ currency,
&fee_refund),
GNUNET_JSON_spec_absolute_time ("stamp_start",
&stamp_start),
@@ -3385,6 +3402,13 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
kcfg = cfg;
+ if (GNUNET_OK !=
+ TALER_config_get_currency (kcfg,
+ &currency))
+ {
+ global_ret = 1;
+ return;
+ }
ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule,
&rc);
rc = GNUNET_CURL_gnunet_rc_create (ctx);