diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-08-25 14:50:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-08-25 14:50:28 +0200 |
commit | 47a6b4be83c3a9376e9bff75c90ec18d822f13a4 (patch) | |
tree | f293c450de9e6454cf41b4d09fc50b4d2e95b66a | |
parent | b4dfce2607bd2ed695d2a8efb99694be0feb17fe (diff) |
-rw-r--r-- | src/exchangedb/Makefile.am | 1 | ||||
-rw-r--r-- | src/exchangedb/pg_insert_kyc_requirement_for_account.c | 67 | ||||
-rw-r--r-- | src/exchangedb/pg_insert_kyc_requirement_for_account.h | 47 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 2 |
4 files changed, 0 insertions, 117 deletions
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 46baf6eef..d51768f46 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -108,7 +108,6 @@ libtaler_plugin_exchangedb_postgres_la_SOURCES = \ pg_get_kyc_rules.h pg_get_kyc_rules.c \ pg_get_pending_kyc_requirement_process.h pg_get_pending_kyc_requirement_process.c \ pg_kyc_provider_account_lookup.h pg_kyc_provider_account_lookup.c \ - pg_insert_kyc_requirement_for_account.h pg_insert_kyc_requirement_for_account.c \ pg_lookup_kyc_process_by_account.h pg_lookup_kyc_process_by_account.c \ pg_update_kyc_process_by_row.h pg_update_kyc_process_by_row.c \ pg_insert_kyc_requirement_process.h pg_insert_kyc_requirement_process.c \ diff --git a/src/exchangedb/pg_insert_kyc_requirement_for_account.c b/src/exchangedb/pg_insert_kyc_requirement_for_account.c deleted file mode 100644 index 776b79ff8..000000000 --- a/src/exchangedb/pg_insert_kyc_requirement_for_account.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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/> - */ -/** - * @file exchangedb/pg_insert_kyc_requirement_for_account.c - * @brief Implementation of the insert_kyc_requirement_for_account function for Postgres - * @author Christian Grothoff - */ -#include "platform.h" -#include "taler_error_codes.h" -#include "taler_dbevents.h" -#include "taler_pq_lib.h" -#include "pg_insert_kyc_requirement_for_account.h" -#include "pg_helper.h" - -enum GNUNET_DB_QueryStatus -TEH_PG_insert_kyc_requirement_for_account ( - void *cls, - const char *provider_name, - const struct TALER_PaytoHashP *h_payto, - const struct TALER_ReservePublicKeyP *reserve_pub, - uint64_t *requirement_row) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (h_payto), - (NULL == reserve_pub) - ? GNUNET_PQ_query_param_null () - : GNUNET_PQ_query_param_auto_from_type (reserve_pub), - GNUNET_PQ_query_param_string (provider_name), - GNUNET_PQ_query_param_end - }; - struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_uint64 ("legitimization_requirement_serial_id", - requirement_row), - GNUNET_PQ_result_spec_end - }; - /* Used in #postgres_insert_kyc_requirement_for_account() */ - PREPARE (pg, - "insert_legitimization_requirement", - "INSERT INTO legitimization_requirements" - " (h_payto" - " ,reserve_pub" - " ,required_checks" - " ) VALUES " - " ($1, $2, $3)" - " ON CONFLICT (h_payto,required_checks) " - " DO UPDATE SET h_payto=$1" /* syntax requirement: dummy op */ - " RETURNING legitimization_requirement_serial_id"); - return GNUNET_PQ_eval_prepared_singleton_select ( - pg->conn, - "insert_legitimization_requirement", - params, - rs); -} diff --git a/src/exchangedb/pg_insert_kyc_requirement_for_account.h b/src/exchangedb/pg_insert_kyc_requirement_for_account.h deleted file mode 100644 index db95502fb..000000000 --- a/src/exchangedb/pg_insert_kyc_requirement_for_account.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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/> - */ -/** - * @file exchangedb/pg_insert_kyc_requirement_for_account.h - * @brief implementation of the insert_kyc_requirement_for_account function for Postgres - * @author Christian Grothoff - */ -#ifndef PG_INSERT_KYC_REQUIREMENT_FOR_ACCOUNT_H -#define PG_INSERT_KYC_REQUIREMENT_FOR_ACCOUNT_H - -#include "taler_util.h" -#include "taler_json_lib.h" -#include "taler_exchangedb_plugin.h" - - -/** - * Insert KYC requirement for @a h_payto account into table. - * - * @param cls closure - * @param provider_name provider that must be checked - * @param h_payto account that must be KYC'ed - * @param reserve_pub if the account is a reserve, its public key. Maybe NULL - * @param[out] requirement_row set to legitimization requirement row for this check - * @return database transaction status - */ -enum GNUNET_DB_QueryStatus -TEH_PG_insert_kyc_requirement_for_account ( - void *cls, - const char *provider_name, - const struct TALER_PaytoHashP *h_payto, - const struct TALER_ReservePublicKeyP *reserve_pub, - uint64_t *requirement_row); - -#endif diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 46ac98382..8de6f4626 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -80,7 +80,6 @@ #include "pg_get_kyc_rules.h" #include "pg_select_aggregation_amounts_for_kyc_check.h" #include "pg_kyc_provider_account_lookup.h" -#include "pg_insert_kyc_requirement_for_account.h" #include "pg_lookup_kyc_process_by_account.h" #include "pg_update_kyc_process_by_row.h" #include "pg_insert_kyc_requirement_process.h" @@ -505,7 +504,6 @@ libtaler_plugin_exchangedb_postgres_init (void *cls) = &TEH_PG_get_kyc_rules; plugin->kyc_provider_account_lookup = &TEH_PG_kyc_provider_account_lookup; - // FIXME: plugin->insert_kyc_requirement_for_account = &TEH_PG_insert_kyc_requirement_for_account; plugin->lookup_kyc_process_by_account = &TEH_PG_lookup_kyc_process_by_account; plugin->update_kyc_process_by_row |