summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-12-06 16:37:32 +0100
committerChristian Grothoff <grothoff@gnunet.org>2021-12-06 16:37:32 +0100
commit7dcd217b60b1a5d64cda357473080970f57aeaab (patch)
treebdfebfcf7eb4b5f06d5cae18da354f2ef94690a3 /src/lib
parentf3629bdafc8edbec75be1bdaa232ddfb7eb514b4 (diff)
downloadexchange-7dcd217b60b1a5d64cda357473080970f57aeaab.tar.gz
exchange-7dcd217b60b1a5d64cda357473080970f57aeaab.tar.bz2
exchange-7dcd217b60b1a5d64cda357473080970f57aeaab.zip
-fix balance calculation
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_common.c9
-rw-r--r--src/lib/exchange_api_deposit.c4
2 files changed, 8 insertions, 5 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
{
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index bb935514b..8b93f56ef 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -629,8 +629,8 @@ TALER_EXCHANGE_deposit (
&h_wire,
h_contract_terms,
(NULL != extension_details)
- ? &ech
- : NULL,
+ ? &ech
+ : NULL,
coin_pub,
denom_sig,
denom_pub,