diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-26 00:09:01 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-26 00:09:01 +0200 |
commit | b87d1112ea479537bda5e1ba1e1100ee53315315 (patch) | |
tree | 4a8f95d685770228ad5e76342a663eabcf355805 /src/lib/exchange_api_kyc_proof.c | |
parent | ddedf03a816e5139b235a3ebdf5b600508c5ed5f (diff) | |
parent | 421129a32ed88fee49108c76e67c16b60f95116b (diff) | |
download | exchange-b87d1112ea479537bda5e1ba1e1100ee53315315.tar.xz |
Merge branch 'master' into age-withdraw-merge
Diffstat (limited to 'src/lib/exchange_api_kyc_proof.c')
-rw-r--r-- | src/lib/exchange_api_kyc_proof.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/lib/exchange_api_kyc_proof.c b/src/lib/exchange_api_kyc_proof.c index 1298df4fd..e7cc9c4cf 100644 --- a/src/lib/exchange_api_kyc_proof.c +++ b/src/lib/exchange_api_kyc_proof.c @@ -37,11 +37,6 @@ struct TALER_EXCHANGE_KycProofHandle { /** - * The connection to exchange this request handle will use - */ - struct TALER_EXCHANGE_Handle *exchange; - - /** * The url for this request. */ char *url; @@ -140,27 +135,22 @@ handle_kyc_proof_finished (void *cls, struct TALER_EXCHANGE_KycProofHandle * -TALER_EXCHANGE_kyc_proof (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_PaytoHashP *h_payto, - const char *logic, - const char *args, - TALER_EXCHANGE_KycProofCallback cb, - void *cb_cls) +TALER_EXCHANGE_kyc_proof ( + struct GNUNET_CURL_Context *ctx, + const char *url, + const struct TALER_PaytoHashP *h_payto, + const char *logic, + const char *args, + TALER_EXCHANGE_KycProofCallback cb, + void *cb_cls) { struct TALER_EXCHANGE_KycProofHandle *kph; - struct GNUNET_CURL_Context *ctx; char *arg_str; if (NULL == args) args = ""; else GNUNET_assert (args[0] == '&'); - if (GNUNET_YES != - TEAH_handle_is_ready (exchange)) - { - GNUNET_break (0); - return NULL; - } { char hstr[sizeof (struct TALER_PaytoHashP) * 2]; char *end; @@ -171,17 +161,17 @@ TALER_EXCHANGE_kyc_proof (struct TALER_EXCHANGE_Handle *exchange, sizeof (hstr)); *end = '\0'; GNUNET_asprintf (&arg_str, - "/kyc-proof/%s?state=%s%s", + "kyc-proof/%s?state=%s%s", logic, hstr, args); } kph = GNUNET_new (struct TALER_EXCHANGE_KycProofHandle); - kph->exchange = exchange; kph->cb = cb; kph->cb_cls = cb_cls; - kph->url = TEAH_path_to_url (exchange, - arg_str); + kph->url = TALER_url_join (url, + arg_str, + NULL); GNUNET_free (arg_str); if (NULL == kph->url) { @@ -202,7 +192,6 @@ TALER_EXCHANGE_kyc_proof (struct TALER_EXCHANGE_Handle *exchange, curl_easy_setopt (kph->eh, CURLOPT_FOLLOWLOCATION, 0L)); - ctx = TEAH_handle_to_context (exchange); kph->job = GNUNET_CURL_job_add_raw (ctx, kph->eh, NULL, |