From 7dcd217b60b1a5d64cda357473080970f57aeaab Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 6 Dec 2021 16:37:32 +0100 Subject: -fix balance calculation --- src/lib/exchange_api_common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/lib/exchange_api_common.c') diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c index c5cf4110..4f6588a2 100644 --- a/src/lib/exchange_api_common.c +++ b/src/lib/exchange_api_common.c @@ -767,6 +767,8 @@ TALER_EXCHANGE_verify_coin_history ( else if (0 == strcasecmp (type, "RECOUP-REFRESH")) { + /* This is the coin that was subjected to a recoup, + the value being credited to the old coin. */ struct TALER_RecoupRefreshConfirmationPS pc = { .purpose.size = htonl (sizeof (pc)), .purpose.purpose = htonl ( @@ -831,12 +833,13 @@ TALER_EXCHANGE_verify_coin_history ( return GNUNET_SYSERR; } *h_denom_pub = rr.h_denom_pub; - add = GNUNET_YES; // FIXME: one of these should be a "NO" - // => need better tests!!! + add = GNUNET_YES; } else if (0 == strcasecmp (type, "OLD-COIN-RECOUP")) { + /* This is the coin that was credited in a recoup, + the value being credited to the this coin. */ struct TALER_RecoupRefreshConfirmationPS pc = { .purpose.size = htonl (sizeof (pc)), .purpose.purpose = htonl ( @@ -879,7 +882,7 @@ TALER_EXCHANGE_verify_coin_history ( GNUNET_break_op (0); return GNUNET_SYSERR; } - add = GNUNET_YES; // FIXME: one of these should be a "NO" + add = GNUNET_NO; } else { -- cgit v1.2.3