commit b53099fee9ab9aa597c0f40f30699da9be1f2333 parent 620933fb685e1a66f27c619bdd519cd7134b8230 Author: Christian Grothoff <christian@grothoff.org> Date: Mon, 1 Apr 2024 22:23:32 +0200 -do not return 0-orders as unwired Diffstat:
| M | src/backend/taler-merchant-httpd_private-get-orders.c | | | 12 | ++++++++++++ |
1 file 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 @@ -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) {