summaryrefslogtreecommitdiff
path: root/src/backenddb/pg_update_instance.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-28 18:29:23 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-28 18:29:23 +0200
commitedcc550215759e91eca93279f8be2d596dba60c4 (patch)
tree8f32670e08b3473eb277f3fbdb50ed0dec951d94 /src/backenddb/pg_update_instance.c
parent46cdd4322c7133f4f26047f97c5edc2d794cb06a (diff)
downloadmerchant-edcc550215759e91eca93279f8be2d596dba60c4.tar.gz
merchant-edcc550215759e91eca93279f8be2d596dba60c4.tar.bz2
merchant-edcc550215759e91eca93279f8be2d596dba60c4.zip
use amount tuples
Diffstat (limited to 'src/backenddb/pg_update_instance.c')
-rw-r--r--src/backenddb/pg_update_instance.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/backenddb/pg_update_instance.c b/src/backenddb/pg_update_instance.c
index 5de6032d..b94fda08 100644
--- a/src/backenddb/pg_update_instance.c
+++ b/src/backenddb/pg_update_instance.c
@@ -16,6 +16,7 @@
/**
* @file backenddb/pg_update_instance.c
* @brief Implementation of the update_instance function for Postgres
+ * @author Christian Grothoff
* @author Iván Ávalos
*/
#include "platform.h"
@@ -36,8 +37,10 @@ TMH_PG_update_instance (void *cls,
GNUNET_PQ_query_param_string (is->name),
TALER_PQ_query_param_json (is->address),
TALER_PQ_query_param_json (is->jurisdiction),
- TALER_PQ_query_param_amount (&is->default_max_deposit_fee),
- TALER_PQ_query_param_amount (&is->default_max_wire_fee),
+ TALER_PQ_query_param_amount_tuple (pg->conn,
+ &is->default_max_deposit_fee),
+ TALER_PQ_query_param_amount_tuple (pg->conn,
+ &is->default_max_wire_fee),
GNUNET_PQ_query_param_uint32 (&is->default_wire_fee_amortization),
GNUNET_PQ_query_param_relative_time (
&is->default_wire_transfer_delay),
@@ -62,17 +65,15 @@ TMH_PG_update_instance (void *cls,
" merchant_name=$2"
",address=$3"
",jurisdiction=$4"
- ",default_max_deposit_fee_val=$5"
- ",default_max_deposit_fee_frac=$6"
- ",default_max_wire_fee_val=$7"
- ",default_max_wire_fee_frac=$8"
- ",default_wire_fee_amortization=$9"
- ",default_wire_transfer_delay=$10"
- ",default_pay_delay=$11"
- ",website=$12"
- ",email=$13"
- ",logo=$14"
- ",user_type=$15"
+ ",default_max_deposit_fee=$5"
+ ",default_max_wire_fee=$6"
+ ",default_wire_fee_amortization=$7"
+ ",default_wire_transfer_delay=$8"
+ ",default_pay_delay=$9"
+ ",website=$10"
+ ",email=$11"
+ ",logo=$12"
+ ",user_type=$13"
" WHERE merchant_id=$1");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"update_instance",