diff options
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 |
commit | d189fccd790a36046e1191d7170f45feb3dfb122 (patch) | |
tree | e1bb8b8d25be3e9245eabadb057c496a714947c7 /src/exchangedb/pg_insert_kyc_requirement_process.c | |
parent | a56a903da3ec46b4c1d1109cc40c2dc149be956b (diff) | |
download | exchange-d189fccd790a36046e1191d7170f45feb3dfb122.tar.xz |
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_process.c')
-rw-r--r-- | src/exchangedb/pg_insert_kyc_requirement_process.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/exchangedb/pg_insert_kyc_requirement_process.c b/src/exchangedb/pg_insert_kyc_requirement_process.c index f1ea5b490..ddd765b99 100644 --- a/src/exchangedb/pg_insert_kyc_requirement_process.c +++ b/src/exchangedb/pg_insert_kyc_requirement_process.c @@ -24,6 +24,7 @@ #include "taler_pq_lib.h" #include "pg_insert_kyc_requirement_process.h" #include "pg_helper.h" +#include <gnunet/gnunet_pq_lib.h> enum GNUNET_DB_QueryStatus TEH_PG_insert_kyc_requirement_process ( @@ -32,6 +33,7 @@ TEH_PG_insert_kyc_requirement_process ( const char *provider_section, const char *provider_account_id, const char *provider_legitimization_id, + const struct TALER_ReservePublicKeyP *reserve_pub, uint64_t *process_row) { struct PostgresClosure *pg = cls; @@ -44,6 +46,9 @@ TEH_PG_insert_kyc_requirement_process ( (NULL != provider_legitimization_id) ? GNUNET_PQ_query_param_string (provider_legitimization_id) : GNUNET_PQ_query_param_null (), + (NULL != reserve_pub) + ? GNUNET_PQ_query_param_auto_from_type (reserve_pub) + : GNUNET_PQ_query_param_null (), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -60,12 +65,14 @@ TEH_PG_insert_kyc_requirement_process ( " ,provider_section" " ,provider_user_id" " ,provider_legitimization_id" + " ,reserve_pub" " ) VALUES " - " ($1, $2, $3, $4)" + " ($1, $2, $3, $4, $5)" " ON CONFLICT (h_payto,provider_section) " " DO UPDATE SET" " provider_user_id=$3" " ,provider_legitimization_id=$4" + " ,reserve_pub=$5" " RETURNING legitimization_process_serial_id"); return GNUNET_PQ_eval_prepared_singleton_select ( pg->conn, |