From 1009084e94b8e8cf19e3b5568c3cccaba2bd2209 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 11 Aug 2022 23:35:33 +0200 Subject: major rework of the KYC logic, making it more configurable, not complete, but tests pass again --- src/lib/exchange_api_deposits_get.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lib/exchange_api_deposits_get.c') diff --git a/src/lib/exchange_api_deposits_get.c b/src/lib/exchange_api_deposits_get.c index baa254a83..4ebff3d81 100644 --- a/src/lib/exchange_api_deposits_get.c +++ b/src/lib/exchange_api_deposits_get.c @@ -176,11 +176,14 @@ handle_deposit_wtid_finished (void *cls, case MHD_HTTP_ACCEPTED: { /* Transaction known, but not executed yet */ + bool no_legi = false; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_timestamp ("execution_time", &dr.details.accepted.execution_time), - GNUNET_JSON_spec_uint64 ("payment_target_uuid", - &dr.details.accepted.payment_target_uuid), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_uint64 ("legitimization_uuid", + &dr.details.accepted.payment_target_uuid), + &no_legi), GNUNET_JSON_spec_bool ("kyc_ok", &dr.details.accepted.kyc_ok), GNUNET_JSON_spec_end () @@ -196,6 +199,8 @@ handle_deposit_wtid_finished (void *cls, dr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; break; } + if (no_legi) + dr.details.accepted.payment_target_uuid = 0; dwh->cb (dwh->cb_cls, &dr); TALER_EXCHANGE_deposits_get_cancel (dwh); -- cgit v1.2.3