From a5f50083e65a3e9a0945b150701349afa81a0e9e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 13 Oct 2023 14:43:50 +0200 Subject: work towards multi-currency support --- src/backenddb/plugin_merchantdb_postgres.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/backenddb/plugin_merchantdb_postgres.c') diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 30def849..c2c99cd1 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -1172,6 +1172,13 @@ postgres_lookup_transfer ( { *have_exchange_sig = ! no_sig; *verified = (0 != verified8); + if (GNUNET_OK != + TALER_amount_cmp_currency (&credit_amount, + wire_fee)) + { + GNUNET_break (0); + return GNUNET_DB_STATUS_HARD_ERROR; + } if ( (! no_sig) && (0 > TALER_amount_add (total_amount, -- cgit v1.2.3