summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_kyc_proof.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-10 01:48:46 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-10 01:48:46 +0100
commit9a3d993d071c4733f1243ef2ab8185210a907b75 (patch)
treec6bf074ee1d05338f46c1103677a7cd1f8152892 /src/testing/testing_api_cmd_kyc_proof.c
parente1e68cebb87980eb3bbcb975a327caac76b366ab (diff)
downloadexchange-9a3d993d071c4733f1243ef2ab8185210a907b75.tar.gz
exchange-9a3d993d071c4733f1243ef2ab8185210a907b75.tar.bz2
exchange-9a3d993d071c4733f1243ef2ab8185210a907b75.zip
-also work with h_payto trait
Diffstat (limited to 'src/testing/testing_api_cmd_kyc_proof.c')
-rw-r--r--src/testing/testing_api_cmd_kyc_proof.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/testing/testing_api_cmd_kyc_proof.c b/src/testing/testing_api_cmd_kyc_proof.c
index 3ee06972e..f9a65afb3 100644
--- a/src/testing/testing_api_cmd_kyc_proof.c
+++ b/src/testing/testing_api_cmd_kyc_proof.c
@@ -149,15 +149,26 @@ proof_kyc_run (void *cls,
TALER_TESTING_get_trait_payto_uri (res_cmd,
&payto_uri))
{
- GNUNET_break (0);
- TALER_TESTING_interpreter_fail (kps->is);
- return;
+ const struct TALER_PaytoHashP *hpt;
+
+ if (GNUNET_OK !=
+ TALER_TESTING_get_trait_h_payto (res_cmd,
+ &hpt))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (kps->is);
+ return;
+ }
+ h_payto = *hpt;
+ }
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Triggering KYC proof for %s\n",
+ *payto_uri);
+ TALER_payto_hash (*payto_uri,
+ &h_payto);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Triggering KYC proof for %s\n",
- *payto_uri);
- TALER_payto_hash (*payto_uri,
- &h_payto);
kps->kph = TALER_EXCHANGE_kyc_proof (is->exchange,
&h_payto,
kps->code,