diff options
Diffstat (limited to 'src/auditordb/pg_insert_deposit_confirmation.c')
-rw-r--r-- | src/auditordb/pg_insert_deposit_confirmation.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/auditordb/pg_insert_deposit_confirmation.c b/src/auditordb/pg_insert_deposit_confirmation.c index 675f8ed0d..1b5205782 100644 --- a/src/auditordb/pg_insert_deposit_confirmation.c +++ b/src/auditordb/pg_insert_deposit_confirmation.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2022 Taler Systems SA + Copyright (C) 2022, 2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -33,15 +33,20 @@ TAH_PG_insert_deposit_confirmation ( { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (&dc->master_public_key), GNUNET_PQ_query_param_auto_from_type (&dc->h_contract_terms), GNUNET_PQ_query_param_auto_from_type (&dc->h_policy), GNUNET_PQ_query_param_auto_from_type (&dc->h_wire), GNUNET_PQ_query_param_timestamp (&dc->exchange_timestamp), GNUNET_PQ_query_param_timestamp (&dc->wire_deadline), GNUNET_PQ_query_param_timestamp (&dc->refund_deadline), - TALER_PQ_query_param_amount (&dc->amount_without_fee), - GNUNET_PQ_query_param_auto_from_type (&dc->coin_pub), + TALER_PQ_query_param_amount (pg->conn, + &dc->total_without_fee), + GNUNET_PQ_query_param_array_auto_from_type (dc->num_coins, + dc->coin_pubs, + pg->conn), + GNUNET_PQ_query_param_array_auto_from_type (dc->num_coins, + dc->coin_sigs, + pg->conn), GNUNET_PQ_query_param_auto_from_type (&dc->merchant), GNUNET_PQ_query_param_auto_from_type (&dc->exchange_sig), GNUNET_PQ_query_param_auto_from_type (&dc->exchange_pub), @@ -52,21 +57,20 @@ TAH_PG_insert_deposit_confirmation ( PREPARE (pg, "auditor_deposit_confirmation_insert", "INSERT INTO deposit_confirmations " - "(master_pub" - ",h_contract_terms" + "(h_contract_terms" ",h_policy" ",h_wire" ",exchange_timestamp" ",wire_deadline" ",refund_deadline" - ",amount_without_fee_val" - ",amount_without_fee_frac" - ",coin_pub" + ",total_without_fee" + ",coin_pubs" + ",coin_sigs" ",merchant_pub" ",exchange_sig" ",exchange_pub" ",master_sig" /* master_sig could be normalized... */ - ") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14);"); + ") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13);"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "auditor_deposit_confirmation_insert", params); |