[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: add missing file
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: add missing file |
Date: |
Sun, 08 Dec 2024 16:50:42 +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 53fe2cc9d add missing file
53fe2cc9d is described below
commit 53fe2cc9d1cc7417361925b1861075c79d3a0250
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Dec 8 16:50:40 2024 +0100
add missing file
---
.../exchange_do_insert_aml_program_failure.sql | 75 ++++++++++++++++++++++
src/exchangedb/exchangedb_aml.c | 2 +-
src/exchangedb/pg_preflight.h | 2 -
3 files changed, 76 insertions(+), 3 deletions(-)
diff --git a/src/exchangedb/exchange_do_insert_aml_program_failure.sql
b/src/exchangedb/exchange_do_insert_aml_program_failure.sql
new file mode 100644
index 000000000..b515cffab
--- /dev/null
+++ b/src/exchangedb/exchange_do_insert_aml_program_failure.sql
@@ -0,0 +1,75 @@
+--
+-- This file is part of TALER
+-- Copyright (C) 2023, 2024 Taler Systems SA
+--
+-- TALER is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 3, or (at your option) any later version.
+--
+-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR
+-- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License along with
+-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+--
+
+DROP FUNCTION IF EXISTS exchange_do_insert_aml_program_failure;
+CREATE FUNCTION exchange_do_insert_aml_program_failure (
+ IN in_legitimization_process_serial_id INT8,
+ IN in_h_payto BYTEA,
+ IN in_now INT8,
+ IN in_error_code INT4,
+ IN in_error_message TEXT,
+ IN in_kyc_completed_notify_s TEXT,
+ OUT out_update BOOLEAN) -- set to true if we had a legi process matching
in_process_row and in_provider_name for this account
+LANGUAGE plpgsql
+AS $$
+BEGIN
+
+
+UPDATE legitimization_processes
+ SET finished=TRUE
+ ,error_code=in_error_code
+ ,error_message=in_error_message
+ WHERE h_payto=in_h_payto
+ AND legitimization_process_serial_id=in_legitimization_process_serial_id;
+out_update = FOUND;
+IF NOT FOUND
+THEN
+ -- Note: in_legitimization_process_serial_id should always be 0 here.
+ -- But we do not check and simply always create a new entry to at least
+ -- not loose information about the event!
+ INSERT INTO legitimization_processes
+ (finished
+ ,error_code
+ ,error_message
+ ,h_payto
+ ,start_time
+ ,provider_section
+ ) VALUES (
+ TRUE
+ ,in_error_code
+ ,in_error_message
+ ,in_h_payto
+ ,in_now
+ ,'skip'
+ );
+END IF;
+
+EXECUTE FORMAT (
+ 'NOTIFY %s'
+ ,in_kyc_completed_notify_s);
+
+INSERT INTO kyc_alerts
+ (h_payto
+ ,trigger_type)
+ VALUES
+ (in_h_payto,1)
+ ON CONFLICT DO NOTHING;
+
+END $$;
+
+
+COMMENT ON FUNCTION exchange_do_insert_aml_program_failure(INT8, BYTEA, INT8,
INT4, TEXT, TEXT)
+ IS 'Stores information about an AML program run that failed into the
legitimization_processes table. Either updates a row of an existing
legitimization process, or creates a new entry.';
diff --git a/src/exchangedb/exchangedb_aml.c b/src/exchangedb/exchangedb_aml.c
index 25d96af0d..147f25286 100644
--- a/src/exchangedb/exchangedb_aml.c
+++ b/src/exchangedb/exchangedb_aml.c
@@ -42,7 +42,7 @@ TALER_EXCHANGEDB_persist_aml_program_result (
enum GNUNET_DB_QueryStatus qs;
#if 0
- /* TODO: also clear lock on AML program (#9303) */
+ /* FIXME: also clear lock on AML program (#9303) */
qs = plugin->clear_aml_lock (
plugin->cls,
account_id,
diff --git a/src/exchangedb/pg_preflight.h b/src/exchangedb/pg_preflight.h
index ba994f1e6..41e31ae28 100644
--- a/src/exchangedb/pg_preflight.h
+++ b/src/exchangedb/pg_preflight.h
@@ -36,8 +36,6 @@
* #GNUNET_NO if a transaction was rolled back
* #GNUNET_SYSERR on hard errors
*/
-
-
enum GNUNET_GenericReturnValue
TEH_PG_preflight (void *cls);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: add missing file,
gnunet <=