aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_kyc_requirement_for_account.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-07-23 12:48:07 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-07-23 12:48:07 +0200
commitd189fccd790a36046e1191d7170f45feb3dfb122 (patch)
treee1bb8b8d25be3e9245eabadb057c496a714947c7 /src/exchangedb/pg_insert_kyc_requirement_for_account.c
parenta56a903da3ec46b4c1d1109cc40c2dc149be956b (diff)
Added reserve_pub to kyc legitimization_processes
Where applicable, the reserve_pub will be passed on to the kcy-legitimization process and persisted along with h_payto. This allows us to set a birthday on the reserve itself, once a related kyc-process has provided one.
Diffstat (limited to 'src/exchangedb/pg_insert_kyc_requirement_for_account.c')
-rw-r--r--src/exchangedb/pg_insert_kyc_requirement_for_account.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/exchangedb/pg_insert_kyc_requirement_for_account.c b/src/exchangedb/pg_insert_kyc_requirement_for_account.c
index 2552aae4..b0b38a33 100644
--- a/src/exchangedb/pg_insert_kyc_requirement_for_account.c
+++ b/src/exchangedb/pg_insert_kyc_requirement_for_account.c
@@ -30,11 +30,15 @@ TEH_PG_insert_kyc_requirement_for_account (
void *cls,
const char *provider_section,
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_section),
GNUNET_PQ_query_param_end
};
@@ -48,9 +52,10 @@ TEH_PG_insert_kyc_requirement_for_account (
"insert_legitimization_requirement",
"INSERT INTO legitimization_requirements"
" (h_payto"
+ " ,reserve_pub"
" ,required_checks"
" ) VALUES "
- " ($1, $2)"
+ " ($1, $2, $3)"
" ON CONFLICT (h_payto,required_checks) "
" DO UPDATE SET h_payto=$1" /* syntax requirement: dummy op */
" RETURNING legitimization_requirement_serial_id");