aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_reserves_get_origin.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-07-20 22:56:19 +0200
committerChristian Grothoff <christian@grothoff.org>2024-07-29 12:18:47 +0200
commitefb46af3eeacdd965097fddfdd7a9fb3dad62603 (patch)
treea0897b5b3c4a0ac24523db976424ab00d61c4f2d /src/exchangedb/pg_reserves_get_origin.c
parentc3ebf7aca5dc33fb342b4e9cbd21d12b8dc090bf (diff)
fix kyc trigger SQL logic
Diffstat (limited to 'src/exchangedb/pg_reserves_get_origin.c')
-rw-r--r--src/exchangedb/pg_reserves_get_origin.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/exchangedb/pg_reserves_get_origin.c b/src/exchangedb/pg_reserves_get_origin.c
index 55d3179d1..2b185cabb 100644
--- a/src/exchangedb/pg_reserves_get_origin.c
+++ b/src/exchangedb/pg_reserves_get_origin.c
@@ -30,7 +30,8 @@ enum GNUNET_DB_QueryStatus
TEH_PG_reserves_get_origin (
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
- struct TALER_PaytoHashP *h_payto)
+ struct TALER_PaytoHashP *h_payto,
+ char **payto_uri)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -38,20 +39,25 @@ TEH_PG_reserves_get_origin (
GNUNET_PQ_query_param_end
};
struct GNUNET_PQ_ResultSpec rs[] = {
- GNUNET_PQ_result_spec_auto_from_type ("wire_source_h_payto",
- h_payto),
+ GNUNET_PQ_result_spec_auto_from_type (
+ "wire_source_h_payto",
+ h_payto),
+ GNUNET_PQ_result_spec_string (
+ "payto_uri",
+ payto_uri),
GNUNET_PQ_result_spec_end
};
-
PREPARE (pg,
"get_h_wire_source_of_reserve",
"SELECT"
" wire_source_h_payto"
+ ",payto_uri"
" FROM reserves_in"
" WHERE reserve_pub=$1");
- return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
- "get_h_wire_source_of_reserve",
- params,
- rs);
+ return GNUNET_PQ_eval_prepared_singleton_select (
+ pg->conn,
+ "get_h_wire_source_of_reserve",
+ params,
+ rs);
}