summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_trigger_aml_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_trigger_aml_process.c')
-rw-r--r--src/exchangedb/pg_trigger_aml_process.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/exchangedb/pg_trigger_aml_process.c b/src/exchangedb/pg_trigger_aml_process.c
index 4dfc8a508..7534fe3df 100644
--- a/src/exchangedb/pg_trigger_aml_process.c
+++ b/src/exchangedb/pg_trigger_aml_process.c
@@ -35,7 +35,8 @@ TEH_PG_trigger_aml_process (
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (h_payto),
- TALER_PQ_query_param_amount (threshold_crossed),
+ TALER_PQ_query_param_amount (pg->conn,
+ threshold_crossed),
GNUNET_PQ_query_param_end
};
@@ -43,16 +44,14 @@ TEH_PG_trigger_aml_process (
"trigger_aml_process",
"INSERT INTO aml_status"
"(h_payto"
- ",threshold_val"
- ",threshold_frac"
+ ",threshold"
",status)"
- "VALUES"
- "($1, $2, $3, 1)" // 1: decision needed
- "ON CONFLICT DO"
+ " VALUES"
+ " ($1, $2, 1)" // 1: decision needed
+ " ON CONFLICT (h_payto) DO"
" UPDATE SET"
- " threshold_val=$2"
- " ,threshold_frac=$3"
- " ,status=status | 1;"); // do not clear 'frozen' status
+ " threshold=$2"
+ " ,status=aml_status.status | 1;"); // do not clear 'frozen' status
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"trigger_aml_process",
params);