diff options
Diffstat (limited to 'src/exchangedb/pg_insert_kyc_requirement_for_account.c')
-rw-r--r-- | src/exchangedb/pg_insert_kyc_requirement_for_account.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/exchangedb/pg_insert_kyc_requirement_for_account.c b/src/exchangedb/pg_insert_kyc_requirement_for_account.c index be5cbac87..95f695297 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 }; @@ -43,14 +47,15 @@ TEH_PG_insert_kyc_requirement_for_account ( requirement_row), GNUNET_PQ_result_spec_end }; - /* Used in #postgres_insert_kyc_requirement_for_account() */ + /* 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)" + " ($1, $2, $3)" " ON CONFLICT (h_payto,required_checks) " " DO UPDATE SET h_payto=$1" /* syntax requirement: dummy op */ " RETURNING legitimization_requirement_serial_id"); |