diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2021-12-06 16:37:32 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2021-12-06 16:37:32 +0100 |
commit | 7dcd217b60b1a5d64cda357473080970f57aeaab (patch) | |
tree | bdfebfcf7eb4b5f06d5cae18da354f2ef94690a3 /src/lib/exchange_api_common.c | |
parent | f3629bdafc8edbec75be1bdaa232ddfb7eb514b4 (diff) | |
download | exchange-7dcd217b60b1a5d64cda357473080970f57aeaab.tar.xz |
-fix balance calculation
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r-- | src/lib/exchange_api_common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c index c5cf4110d..4f6588a20 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 { |