From a046899b2ccd452f786051a41bc385cfb574bbcb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 20 Aug 2022 21:29:29 +0200 Subject: -major KYC update, fixes misc. issues --- src/testing/testing_api_cmd_kyc_wallet_get.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/testing/testing_api_cmd_kyc_wallet_get.c') diff --git a/src/testing/testing_api_cmd_kyc_wallet_get.c b/src/testing/testing_api_cmd_kyc_wallet_get.c index 775aa1a82..23df3b9df 100644 --- a/src/testing/testing_api_cmd_kyc_wallet_get.c +++ b/src/testing/testing_api_cmd_kyc_wallet_get.c @@ -59,10 +59,16 @@ struct KycWalletGetState unsigned int expected_response_code; /** - * Set to the KYC UUID *if* the exchange replied with - * a request for KYC (#MHD_HTTP_ACCEPTED). + * Set to the KYC requirement payto hash *if* the exchange replied with a + * request for KYC (#MHD_HTTP_OK). */ - uint64_t kyc_uuid; + struct TALER_PaytoHashP h_payto; + + /** + * Set to the KYC requirement row *if* the exchange replied with + * a request for KYC (#MHD_HTTP_OK). + */ + uint64_t requirement_row; /** * Handle to the "track transaction" pending operation. @@ -111,15 +117,18 @@ wallet_kyc_cb (void *cls, } switch (wkr->http_status) { - case MHD_HTTP_OK: - kwg->kyc_uuid = wkr->legitimization_uuid; - break; case MHD_HTTP_NO_CONTENT: break; case MHD_HTTP_FORBIDDEN: GNUNET_break (0); TALER_TESTING_interpreter_fail (is); return; + case MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS: + kwg->requirement_row + = wkr->details.unavailable_for_legal_reasons.requirement_row; + kwg->h_payto + = wkr->details.unavailable_for_legal_reasons.h_payto; + break; default: GNUNET_break (0); break; @@ -232,7 +241,8 @@ wallet_kyc_traits (void *cls, struct TALER_TESTING_Trait traits[] = { TALER_TESTING_make_trait_reserve_priv (&kwg->reserve_priv), TALER_TESTING_make_trait_reserve_pub (&kwg->reserve_pub), - TALER_TESTING_make_trait_legitimization_uuid (&kwg->kyc_uuid), + TALER_TESTING_make_trait_legi_requirement_row (&kwg->requirement_row), + TALER_TESTING_make_trait_h_payto (&kwg->h_payto), TALER_TESTING_make_trait_payto_uri ( (const char **) &kwg->reserve_payto_uri), TALER_TESTING_trait_end () -- cgit v1.2.3