gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: also inform about AML-triggered


From: gnunet
Subject: [taler-exchange] branch master updated: also inform about AML-triggered KYC requirement in GET deposits endpoint
Date: Sun, 19 Feb 2023 10:26:09 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 2fd87736 also inform about AML-triggered KYC requirement in GET 
deposits endpoint
2fd87736 is described below

commit 2fd87736b435fbc7426c9fe80c3c5961a3892e1b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 19 10:26:06 2023 +0100

    also inform about AML-triggered KYC requirement in GET deposits endpoint
---
 src/exchangedb/pg_lookup_transfer_by_deposit.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/exchangedb/pg_lookup_transfer_by_deposit.c 
b/src/exchangedb/pg_lookup_transfer_by_deposit.c
index 63b132f0..a9de0dd6 100644
--- a/src/exchangedb/pg_lookup_transfer_by_deposit.c
+++ b/src/exchangedb/pg_lookup_transfer_by_deposit.c
@@ -134,6 +134,7 @@ TEH_PG_lookup_transfer_by_deposit (
        do not have a WTID yet. In that case, return without wtid
        (by setting 'pending' true). */
     uint32_t status32 = TALER_AML_NORMAL;
+    uint64_t aml_kyc_row = 0;
     struct GNUNET_PQ_ResultSpec rs2[] = {
       GNUNET_PQ_result_spec_auto_from_type ("wire_salt",
                                             &wire_salt),
@@ -143,6 +144,10 @@ TEH_PG_lookup_transfer_by_deposit (
         GNUNET_PQ_result_spec_uint64 ("legitimization_requirement_serial_id",
                                       &kyc->requirement_row),
         NULL),
+      GNUNET_PQ_result_spec_allow_null (
+        GNUNET_PQ_result_spec_uint64 ("kyc_requirement",
+                                      &aml_kyc_row),
+        NULL),
       TALER_PQ_RESULT_SPEC_AMOUNT ("amount_with_fee",
                                    amount_with_fee),
       TALER_PQ_RESULT_SPEC_AMOUNT ("fee_deposit",
@@ -168,6 +173,7 @@ TEH_PG_lookup_transfer_by_deposit (
              ",denom.fee_deposit_frac"
              ",dep.wire_deadline"
              ",aml.status"
+             ",aml.kyc_requirement"
              " FROM deposits dep"
              " JOIN wire_targets wt"
              "   USING (wire_target_h_payto)"
@@ -195,6 +201,14 @@ TEH_PG_lookup_transfer_by_deposit (
       *aml_decision = (enum TALER_AmlDecisionState) status32;
       if (0 == kyc->requirement_row)
         kyc->ok = true; /* technically: unknown */
+      if ( (kyc->ok) &&
+           (TALER_AML_FROZEN == *aml_decision) &&
+           (0 != aml_kyc_row) )
+      {
+        /* KYC required via AML */
+        kyc->ok = false;
+        kyc->requirement_row = aml_kyc_row;
+      }
       TALER_merchant_wire_signature_hash (payto_uri,
                                           &wire_salt,
                                           &wh);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]