aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_insert_kyc_attributes.sql
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-14 17:37:53 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-14 17:37:53 +0200
commit6e5092d83473dc1b0200d82744cf0f0056b0c110 (patch)
tree3a402d87e500fd4e85efb2ec19dfae6d942d9265 /src/exchangedb/exchange_do_insert_kyc_attributes.sql
parent1d088120a5c378ec5fe2d9cfd86353f9b75220c4 (diff)
downloadexchange-6e5092d83473dc1b0200d82744cf0f0056b0c110.tar.xz
more work towards auditor support for AML/KYC
Diffstat (limited to 'src/exchangedb/exchange_do_insert_kyc_attributes.sql')
-rw-r--r--src/exchangedb/exchange_do_insert_kyc_attributes.sql8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/exchangedb/exchange_do_insert_kyc_attributes.sql b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
index d9818c882..2efc0aec5 100644
--- a/src/exchangedb/exchange_do_insert_kyc_attributes.sql
+++ b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
@@ -19,6 +19,7 @@ CREATE OR REPLACE FUNCTION exchange_do_insert_kyc_attributes(
IN in_h_payto BYTEA,
IN in_kyc_prox BYTEA,
IN in_provider_section TEXT,
+ IN in_satisfied_checks TEXT[],
IN in_birthday INT4,
IN in_provider_account_id TEXT,
IN in_provider_legitimization_id TEXT,
@@ -40,6 +41,7 @@ INSERT INTO exchange.kyc_attributes
(h_payto
,kyc_prox
,provider
+ ,satisfied_checks
,collection_time
,expiration_time
,encrypted_attributes
@@ -48,6 +50,7 @@ INSERT INTO exchange.kyc_attributes
(in_h_payto
,in_kyc_prox
,in_provider_section
+ ,in_satisfied_checks
,in_collection_time_ts
,in_expiration_time_ts
,in_enc_attributes
@@ -68,7 +71,8 @@ out_ok = FOUND;
SELECT reserve_pub
INTO orig_reserve_pub
FROM exchange.legitimization_requirements
- WHERE h_payto=in_h_payto AND NOT reserve_pub IS NULL;
+ WHERE h_payto=in_h_payto
+ AND NOT reserve_pub IS NULL;
orig_reserve_found = FOUND;
IF orig_reserve_found
@@ -105,5 +109,5 @@ INSERT INTO kyc_alerts
END $$;
-COMMENT ON FUNCTION exchange_do_insert_kyc_attributes(INT8, BYTEA, BYTEA, TEXT, INT4, TEXT, TEXT, INT8, INT8, INT8, BYTEA, BOOL, TEXT)
+COMMENT ON FUNCTION exchange_do_insert_kyc_attributes(INT8, BYTEA, BYTEA, TEXT, TEXT[], INT4, TEXT, TEXT, INT8, INT8, INT8, BYTEA, BOOL, TEXT)
IS 'Inserts new KYC attributes and updates the status of the legitimization process and the AML status for the account';