commit c24d0e772552b2c1dbc043ef759445805793e51e
parent 59c1318beeb5b29a4f5e2394591a83945617dedb
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 10 Mar 2022 01:45:14 +0100
URI now contains h_payto, not the serial id
Diffstat:
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/testing/testing_api_cmd_kyc_get.c b/src/testing/testing_api_cmd_kyc_get.c
@@ -62,10 +62,10 @@ struct KycGetState
const char *exchange_url;
/**
- * Set to the payment target UUID of the first exchange account
- * for which we failed to pass the KYC check, or 0.
+ * Set to the payto hash of the first account
+ * for which we failed to pass the KYC check.
*/
- uint64_t payment_target_uuid;
+ struct TALER_PaytoHashP h_payto;
/**
* Expected HTTP response code.
@@ -133,9 +133,7 @@ kyc_get_cb (void *cls,
const char *end;
char *dec;
const char *eq;
- unsigned long long uuid;
size_t toklen;
- char dummy;
url = kr->details.kyc_status.pending_kycs[0].kyc_url;
tok = strstr (url, "&redirect_uri=");
@@ -161,10 +159,11 @@ kyc_get_cb (void *cls,
TALER_TESTING_FAIL (cs->is);
}
eq++;
- if (1 != sscanf (eq,
- "%llu%c",
- &uuid,
- &dummy))
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_string_to_data (eq,
+ strlen (eq),
+ &cs->h_payto,
+ sizeof (cs->h_payto)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Received unexpected KYC URL `%s' (%s)\n",
@@ -174,7 +173,6 @@ kyc_get_cb (void *cls,
TALER_TESTING_FAIL (cs->is);
}
GNUNET_free (dec);
- cs->payment_target_uuid = uuid;
}
break;
}
@@ -259,8 +257,8 @@ kyc_get_traits (void *cls,
{
struct KycGetState *cs = cls;
struct TALER_TESTING_Trait traits[] = {
- TALER_TESTING_make_trait_payment_target_uuid (
- &cs->payment_target_uuid),
+ TALER_TESTING_make_trait_h_payto (
+ &cs->h_payto),
TALER_TESTING_trait_end ()
};