summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_aml-decisions-get.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-02-04 21:54:47 +0100
committerChristian Grothoff <christian@grothoff.org>2023-02-04 21:54:47 +0100
commit5a18e955ebd663a6e1318378002a6368a7c07566 (patch)
tree9f1d6349f36bf053253382705e2032e8e738c5ba /src/exchange/taler-exchange-httpd_aml-decisions-get.c
parent47b9ef598dc33e10294c1af4c7cf0e2ac71f553e (diff)
downloadexchange-5a18e955ebd663a6e1318378002a6368a7c07566.tar.gz
exchange-5a18e955ebd663a6e1318378002a6368a7c07566.tar.bz2
exchange-5a18e955ebd663a6e1318378002a6368a7c07566.zip
-fix AML decision update logic and history fetch logic
Diffstat (limited to 'src/exchange/taler-exchange-httpd_aml-decisions-get.c')
-rw-r--r--src/exchange/taler-exchange-httpd_aml-decisions-get.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd_aml-decisions-get.c b/src/exchange/taler-exchange-httpd_aml-decisions-get.c
index ad160b821..0183ac3b8 100644
--- a/src/exchange/taler-exchange-httpd_aml-decisions-get.c
+++ b/src/exchange/taler-exchange-httpd_aml-decisions-get.c
@@ -63,10 +63,10 @@ record_cb (
GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("h_payto",
h_payto),
- TALER_JSON_pack_amount ("threshold",
- threshold),
GNUNET_JSON_pack_int64 ("current_state",
status),
+ TALER_JSON_pack_amount ("threshold",
+ threshold),
GNUNET_JSON_pack_int64 ("rowid",
row_id)
)));
@@ -98,8 +98,8 @@ TEH_handler_aml_decisions_get (
else if (0 == strcmp (state_str,
"frozen"))
decision = TALER_AML_FROZEN;
- if (0 == strcmp (state_str,
- "normal"))
+ else if (0 == strcmp (state_str,
+ "normal"))
decision = TALER_AML_NORMAL;
else
{
@@ -172,10 +172,11 @@ TEH_handler_aml_decisions_get (
qs = TEH_plugin->select_aml_process (TEH_plugin->cls,
decision,
start,
- delta > 0,
GNUNET_MIN (MAX_RECORDS,
- delta > 0 ? delta :
- -delta),
+ delta > 0
+ ? delta
+ : -delta),
+ delta > 0,
&record_cb,
records);
switch (qs)