aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-12-29 11:48:57 +0100
committerChristian Grothoff <christian@grothoff.org>2022-12-29 11:48:57 +0100
commit26aa9d985e2f9ba6ce3895e7e2625226e2008bfb (patch)
tree951a3d49375a225103c363f005bd0399a195eed4 /src/lib
parentfa840f7071da56c4794c887b813ca2a6f491f836 (diff)
downloadexchange-26aa9d985e2f9ba6ce3895e7e2625226e2008bfb.tar.xz
expand DB API with AML functions, fix purse refund calculations in libtalerexchange
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_common.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 3807b997f..b895bf9a8 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -1336,15 +1336,11 @@ help_purse_deposit (struct CoinHistoryParseContext *pc,
}
if (refunded)
{
- /* We add the amount to refunds here, the original
- deposit will be added to the balance later because
- we still return GNUNET_YES, thus effectively
- cancelling out this operation with respect to
- the final balance. */
+ /* We wave the deposit fee. */
if (0 >
TALER_amount_add (&pc->rtotal,
&pc->rtotal,
- amount))
+ &pc->dk->fees.deposit))
{
/* overflow in refund history? inconceivable! Bad exchange! */
GNUNET_break_op (0);
@@ -1415,15 +1411,6 @@ help_purse_refund (struct CoinHistoryParseContext *pc,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- if (0 >
- TALER_amount_add (&pc->rtotal,
- &pc->rtotal,
- amount))
- {
- /* overflow in refund history? inconceivable! Bad exchange! */
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
return GNUNET_NO;
}