summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-aggregator.c4
-rw-r--r--src/exchange/taler-exchange-closer.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index afedd7e37..22bc3c7bb 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -363,7 +363,7 @@ deposit_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
- const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_PrivateContractHash *h_contract_terms,
const json_t *wire)
{
struct AggregationUnit *au = cls;
@@ -528,7 +528,7 @@ aggregate_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
- const struct GNUNET_HashCode *h_contract_terms)
+ const struct TALER_PrivateContractHash *h_contract_terms)
{
struct AggregationUnit *au = cls;
struct TALER_Amount old;
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c
index 91ececc85..a206cea80 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -217,7 +217,7 @@ expired_reserve_cb (void *cls,
struct TALER_WireTransferIdentifierRawP wtid;
struct TALER_Amount amount_without_fee;
struct TALER_Amount closing_fee;
- int ret;
+ enum TALER_AmountArithmeticResult ret;
enum GNUNET_DB_QueryStatus qs;
const struct TALER_EXCHANGEDB_AccountInfo *wa;
@@ -273,8 +273,8 @@ expired_reserve_cb (void *cls,
ret = TALER_amount_subtract (&amount_without_fee,
left,
&closing_fee);
- if ( (GNUNET_SYSERR == ret) ||
- (GNUNET_NO == ret) )
+ if ( (TALER_AAR_INVALID_NEGATIVE_RESULT == ret) ||
+ (TALER_AAR_RESULT_ZERO == ret) )
{
/* Closing fee higher than or equal to remaining balance, close
without wire transfer. */
@@ -283,6 +283,7 @@ expired_reserve_cb (void *cls,
TALER_amount_set_zero (left->currency,
&amount_without_fee));
}
+ GNUNET_assert (TALER_AAR_RESULT_POSITIVE == ret);
/* round down to enable transfer */
if (GNUNET_SYSERR ==
TALER_amount_round_down (&amount_without_fee,