summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-11 23:35:33 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-11 23:35:33 +0200
commit1009084e94b8e8cf19e3b5568c3cccaba2bd2209 (patch)
treea346997dedd05f685ba7addc59e288dfa550ad0e /src/lib/exchange_api_common.c
parentb061ea85c84facfc78c34edface367c5f040bc9c (diff)
downloadexchange-1009084e94b8e8cf19e3b5568c3cccaba2bd2209.tar.gz
exchange-1009084e94b8e8cf19e3b5568c3cccaba2bd2209.tar.bz2
exchange-1009084e94b8e8cf19e3b5568c3cccaba2bd2209.zip
major rework of the KYC logic, making it more configurable, not complete, but tests pass again
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r--src/lib/exchange_api_common.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index b64053f24..2cb379f8f 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -1458,50 +1458,6 @@ TALER_EXCHANGE_check_purse_create_conflict_ (
}
-static char *
-make_payto (const char *exchange_url,
- const struct TALER_ReservePublicKeyP *reserve_pub)
-{
- char pub_str[sizeof (*reserve_pub) * 2];
- char *end;
- bool is_http;
- char *reserve_url;
-
- end = GNUNET_STRINGS_data_to_string (
- reserve_pub,
- sizeof (*reserve_pub),
- pub_str,
- sizeof (pub_str));
- *end = '\0';
- if (0 == strncmp (exchange_url,
- "http://",
- strlen ("http://")))
- {
- is_http = true;
- exchange_url = &exchange_url[strlen ("http://")];
- }
- else if (0 == strncmp (exchange_url,
- "https://",
- strlen ("https://")))
- {
- is_http = false;
- exchange_url = &exchange_url[strlen ("https://")];
- }
- else
- {
- GNUNET_break (0);
- return NULL;
- }
- /* exchange_url includes trailing '/' */
- GNUNET_asprintf (&reserve_url,
- "payto://%s/%s%s",
- is_http ? "taler+http" : "taler",
- exchange_url,
- pub_str);
- return reserve_url;
-}
-
-
enum GNUNET_GenericReturnValue
TALER_EXCHANGE_check_purse_merge_conflict_ (
const struct TALER_PurseMergeSignatureP *cmerge_sig,
@@ -1539,8 +1495,8 @@ TALER_EXCHANGE_check_purse_merge_conflict_ (
}
if (NULL == partner_url)
partner_url = exchange_url;
- payto_uri = make_payto (partner_url,
- &reserve_pub);
+ payto_uri = TALER_reserve_make_payto (partner_url,
+ &reserve_pub);
if (GNUNET_OK !=
TALER_wallet_purse_merge_verify (
payto_uri,