aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_merge.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c b/src/exchange/taler-exchange-httpd_purses_merge.c
index 2121169c2..602463373 100644
--- a/src/exchange/taler-exchange-httpd_purses_merge.c
+++ b/src/exchange/taler-exchange-httpd_purses_merge.c
@@ -304,17 +304,6 @@ TEH_handler_purses_merge (
}
}
- pcc.wf = TEH_wire_fees_by_time (pcc.exchange_timestamp,
- "sepa"); // FIXME!
- if (NULL == pcc.wf)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Cannot create purse: global fees not configured!\n");
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING,
- NULL);
- }
/* Fetch purse details */
qs = TEH_plugin->select_purse_request (TEH_plugin->cls,
pcc.purse_pub,
@@ -415,6 +404,28 @@ TEH_handler_purses_merge (
/* we use NULL to represent 'self' as the provider */
GNUNET_free (pcc.provider_url);
}
+ else
+ {
+ char *method = GNUNET_strdup ("FIXME");
+
+ /* FIXME: lookup wire method by pcc.provider_url! */
+ pcc.wf = TEH_wire_fees_by_time (pcc.exchange_timestamp,
+ method);
+ if (NULL == pcc.wf)
+ {
+ MHD_RESULT res;
+
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Cannot merge purse: wire fees not configured!\n");
+ res = TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_EXCHANGE_GENERIC_WIRE_FEES_MISSING,
+ method);
+ GNUNET_free (method);
+ return res;
+ }
+ GNUNET_free (method);
+ }
/* check signatures */
if (GNUNET_OK !=
TALER_wallet_purse_merge_verify (