commit 26094832ff4cc20c3aab7242e1ee25b1291da256
parent 4cff45dbf755c8a1201639b15ddd2d2004cbab02
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 4 Feb 2026 00:11:02 +0100
expose deposit_fee explicitly for #10964
Diffstat:
5 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -1415,6 +1415,8 @@ phase_check_deposits (struct GetOrderRequestContext *gorc)
* @param deposit_fee deposit fee charged by the exchange for the coin
* @param transfer_confirmed did the merchant confirm that a wire transfer with
* @a wtid over the total amount happened?
+ * @param expected_credit_serial row for the expected wire transfer this
+ * entry references
*/
static void
process_transfer_details (
@@ -1465,6 +1467,8 @@ process_transfer_details (
exchange_url),
TALER_JSON_pack_amount ("amount",
&wired),
+ TALER_JSON_pack_amount ("deposit_fee",
+ deposit_fee),
GNUNET_JSON_pack_timestamp ("execution_time",
execution_time),
GNUNET_JSON_pack_bool ("confirmed",
diff --git a/src/backenddb/pg_lookup_transfer_details.c b/src/backenddb/pg_lookup_transfer_details.c
@@ -104,12 +104,12 @@ lookup_transfer_details_cb (void *cls,
enum GNUNET_DB_QueryStatus
-TMH_PG_lookup_transfer_details (void *cls,
- const char *exchange_url,
- const struct TALER_WireTransferIdentifierRawP *
- wtid,
- TALER_MERCHANTDB_TransferDetailsCallback cb,
- void *cb_cls)
+TMH_PG_lookup_transfer_details (
+ void *cls,
+ const char *exchange_url,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ TALER_MERCHANTDB_TransferDetailsCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
diff --git a/src/backenddb/pg_lookup_transfer_details_by_order.c b/src/backenddb/pg_lookup_transfer_details_by_order.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2023, 2025 Taler Systems SA
+ Copyright (C) 2023, 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -23,6 +23,7 @@
#include <taler/taler_dbevents.h>
#include <taler/taler_pq_lib.h>
#include "pg_lookup_transfer_details_by_order.h"
+#include "pg_lookup_wire_fee.h"
#include "pg_helper.h"
/**
diff --git a/src/backenddb/pg_lookup_wire_fee.c b/src/backenddb/pg_lookup_wire_fee.c
@@ -61,7 +61,6 @@ TMH_PG_lookup_wire_fee (void *cls,
GNUNET_CRYPTO_hash (wire_method,
strlen (wire_method) + 1,
&h_wire_method);
-
PREPARE (pg,
"lookup_wire_fee",
"SELECT"
@@ -75,7 +74,6 @@ TMH_PG_lookup_wire_fee (void *cls,
" AND h_wire_method=$2"
" AND start_date <= $3"
" AND end_date > $3");
-
return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
"lookup_wire_fee",
params,
diff --git a/src/util/validators.c b/src/util/validators.c
@@ -59,13 +59,6 @@ TALER_MERCHANT_email_valid (const char *email)
regex_t regex;
bool is_valid;
- if ('\0' == email[0])
- return false;
-
- /* Maximum email length per RFC 5321 */
- if (strlen (email) > 254)
- return false;
-
/*
* Email regex pattern supporting:
*
@@ -117,6 +110,13 @@ TALER_MERCHANT_email_valid (const char *email)
"\\[IPv6:[0-9a-fA-F:]*[0-9a-fA-F]\\]"
")$";
+ if ('\0' == email[0])
+ return false;
+
+ /* Maximum email length per RFC 5321 */
+ if (strlen (email) > 254)
+ return false;
+
GNUNET_assert (0 ==
regcomp (®ex,
pattern,