summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_do_refund.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_do_refund.c')
-rw-r--r--src/exchangedb/pg_do_refund.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/exchangedb/pg_do_refund.c b/src/exchangedb/pg_do_refund.c
index 1059f9cbb..194dab18d 100644
--- a/src/exchangedb/pg_do_refund.c
+++ b/src/exchangedb/pg_do_refund.c
@@ -25,6 +25,8 @@
#include "pg_do_refund.h"
#include "pg_helper.h"
#include "pg_compute_shard.h"
+
+
enum GNUNET_DB_QueryStatus
TEH_PG_do_refund (
void *cls,
@@ -40,9 +42,12 @@ TEH_PG_do_refund (
uint64_t deposit_shard = TEH_PG_compute_shard (&refund->details.merchant_pub);
struct TALER_Amount amount_without_fee;
struct GNUNET_PQ_QueryParam params[] = {
- TALER_PQ_query_param_amount (&refund->details.refund_amount),
- TALER_PQ_query_param_amount (&amount_without_fee),
- TALER_PQ_query_param_amount (deposit_fee),
+ TALER_PQ_query_param_amount (pg->conn,
+ &refund->details.refund_amount),
+ TALER_PQ_query_param_amount (pg->conn,
+ &amount_without_fee),
+ TALER_PQ_query_param_amount (pg->conn,
+ deposit_fee),
GNUNET_PQ_query_param_auto_from_type (&refund->details.h_contract_terms),
GNUNET_PQ_query_param_uint64 (&refund->details.rtransaction_id),
GNUNET_PQ_query_param_uint64 (&deposit_shard),
@@ -72,7 +77,6 @@ TEH_PG_do_refund (
GNUNET_break (0);
return GNUNET_DB_STATUS_HARD_ERROR;
}
- /* Used in #postgres_do_refund() to refund a deposit. */
PREPARE (pg,
"call_refund",
"SELECT "
@@ -81,8 +85,7 @@ TEH_PG_do_refund (
",out_gone AS gone"
",out_conflict AS conflict"
" FROM exchange_do_refund"
- " ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13);");
-
+ " ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10);");
return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
"call_refund",
params,