diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-04-01 22:23:32 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-04-01 22:23:32 +0200 |
commit | b53099fee9ab9aa597c0f40f30699da9be1f2333 (patch) | |
tree | 27c0a3f5efa64f56d076b611a0f7b21130b8a043 | |
parent | 620933fb685e1a66f27c619bdd519cd7134b8230 (diff) |
-do not return 0-orders as unwiredbfh-snack-2024-4
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-orders.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c index 5fc91188..4c6a104e 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders.c +++ b/src/backend/taler-merchant-httpd_private-get-orders.c @@ -406,6 +406,18 @@ add_order (void *cls, return; } + if (TALER_amount_is_zero (&order_amount) && + (po->of.wired != TALER_EXCHANGE_YNA_ALL) ) + { + /* If we are actually filtering by wire status, + and the order was over an amount of zero, + do not return it as wire status is not + exactly meaningful for orders over zero. */ + json_decref (contract_terms); + GNUNET_free (order_id); + return; + } + if (GNUNET_TIME_absolute_is_future (rd.abs_time) && paid) { |