summaryrefslogtreecommitdiff
path: root/src/exchangedb/exchangedb_transactions.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 23:52:01 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 23:52:01 +0200
commit84a40be0bce66cda800de7891f758a0c69afc7fa (patch)
treeaff8ee61032353024cf1a8429f0804162f81085a /src/exchangedb/exchangedb_transactions.c
parent1554cc310d450ee5cfbf3afd947ed8a063043254 (diff)
downloadexchange-84a40be0bce66cda800de7891f758a0c69afc7fa.tar.gz
exchange-84a40be0bce66cda800de7891f758a0c69afc7fa.tar.bz2
exchange-84a40be0bce66cda800de7891f758a0c69afc7fa.zip
fix #6170 and rest of #6164
Diffstat (limited to 'src/exchangedb/exchangedb_transactions.c')
-rw-r--r--src/exchangedb/exchangedb_transactions.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c
index ade7f9cf..7fe65d52 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -55,7 +55,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
{
case TALER_EXCHANGEDB_TT_DEPOSIT:
/* spent += pos->amount_with_fee */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&spent,
&spent,
&pos->details.deposit->amount_with_fee))
@@ -67,7 +67,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_MELT:
/* spent += pos->amount_with_fee */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&spent,
&spent,
&pos->details.melt->amount_with_fee))
@@ -78,7 +78,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_REFUND:
/* refunded += pos->refund_amount - pos->refund_fee */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&refunded,
&refunded,
&pos->details.refund->refund_amount))
@@ -86,7 +86,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
GNUNET_break (0);
return GNUNET_SYSERR;
}
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&spent,
&spent,
&pos->details.refund->refund_fee))
@@ -98,7 +98,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_OLD_COIN_RECOUP:
/* refunded += pos->value */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&refunded,
&refunded,
&pos->details.old_coin_recoup->value))
@@ -109,7 +109,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_RECOUP:
/* spent += pos->value */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&spent,
&spent,
&pos->details.recoup->value))
@@ -120,7 +120,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_RECOUP_REFRESH:
/* spent += pos->value */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&spent,
&spent,
&pos->details.recoup_refresh->value))
@@ -134,7 +134,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
if (have_refund)
{
/* If we gave any refund, also discount ONE deposit fee */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&refunded,
&refunded,
&deposit_fee))
@@ -144,7 +144,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
}
}
/* spent = spent - refunded */
- if (GNUNET_SYSERR ==
+ if (0 >
TALER_amount_subtract (&spent,
&spent,
&refunded))