exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit db68289fcf9a8db240a98a970696b2779d442f9e
parent 4716fe3926d3ac32a6d304b992d092075dc1af7b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 17 Jul 2024 23:54:30 +0200

-SQL fixes

Diffstat:
Msrc/exchangedb/pg_iterate_kyc_reference.c | 11++++++-----
Msrc/exchangedb/pg_select_kyc_attributes.c | 16+++++++++-------
Msrc/testing/testing_api_cmd_reserve_close.c | 9+++------
3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/exchangedb/pg_iterate_kyc_reference.c b/src/exchangedb/pg_iterate_kyc_reference.c @@ -121,9 +121,10 @@ TEH_PG_iterate_kyc_reference ( ",provider_legitimization_id" " FROM legitimization_processes" " WHERE h_payto=$1;"); - return GNUNET_PQ_eval_prepared_multi_select (pg->conn, - "iterate_kyc_reference", - params, - &iterate_kyc_reference_cb, - &ic); + return GNUNET_PQ_eval_prepared_multi_select ( + pg->conn, + "iterate_kyc_reference", + params, + &iterate_kyc_reference_cb, + &ic); } diff --git a/src/exchangedb/pg_select_kyc_attributes.c b/src/exchangedb/pg_select_kyc_attributes.c @@ -81,7 +81,7 @@ get_attributes_cb (void *cls, void *enc_attributes; char *provider; struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_string ("provider", + GNUNET_PQ_result_spec_string ("provider_name", &provider), GNUNET_PQ_result_spec_timestamp ("collection_time", &collection_time), @@ -138,12 +138,14 @@ TEH_PG_select_kyc_attributes ( PREPARE (pg, "select_kyc_attributes", "SELECT " - " provider" - ",collection_time" - ",expiration_time" - ",encrypted_attributes" - " FROM kyc_attributes" - " WHERE h_payto=$1"); + " lp.provider_name" + ",ka.collection_time" + ",ka.expiration_time" + ",ka.encrypted_attributes" + " FROM kyc_attributes ka" + " JOIN legitimization_processes lp" + " USING (legitimization_process_serial_id)" + " WHERE ka.h_payto=$1"); qs = GNUNET_PQ_eval_prepared_multi_select ( pg->conn, "select_kyc_attributes", diff --git a/src/testing/testing_api_cmd_reserve_close.c b/src/testing/testing_api_cmd_reserve_close.c @@ -99,15 +99,12 @@ reserve_close_cb (void *cls, ss->rsh = NULL; if (ss->expected_response_code != rs->hr.http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected HTTP response code: %d in %s:%u\n", - rs->hr.http_status, - __FILE__, - __LINE__); + TALER_TESTING_unexpected_status (ss->is, + rs->hr.http_status, + ss->expected_response_code); json_dumpf (rs->hr.reply, stderr, JSON_INDENT (2)); - TALER_TESTING_interpreter_fail (ss->is); return; } switch (rs->hr.http_status)