diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-10-13 14:43:50 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-10-13 21:16:50 +0200 |
commit | a5f50083e65a3e9a0945b150701349afa81a0e9e (patch) | |
tree | a6a89fa83c78d812a7f6a38e851659cf443269dd /src/backenddb/plugin_merchantdb_postgres.c | |
parent | a8b2456ecf47e2650f8bac1da3cc25b4ace54d24 (diff) | |
download | merchant-a5f50083e65a3e9a0945b150701349afa81a0e9e.tar.gz merchant-a5f50083e65a3e9a0945b150701349afa81a0e9e.tar.bz2 merchant-a5f50083e65a3e9a0945b150701349afa81a0e9e.zip |
work towards multi-currency support
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |