diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-23 10:30:31 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-23 10:30:31 +0200 |
commit | 48d4690fbd0576e900332dcbfb285d0537091abf (patch) | |
tree | da647e35db2489bbed95b1cd82935c2c664d5e84 | |
parent | 697f522c79adc9551b90063b3d2939bcf2cfc7ac (diff) | |
download | exchange-48d4690fbd0576e900332dcbfb285d0537091abf.tar.xz |
clarify with/without wire fee issue, sanity checks on currencies
-rw-r--r-- | src/include/taler_exchange_service.h | 2 | ||||
-rw-r--r-- | src/lib/exchange_api_transfers_get.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 079987020..e61a07c91 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1611,7 +1611,7 @@ struct TALER_EXCHANGE_TransferData struct GNUNET_TIME_Absolute execution_time; /** - * amount of the wire transfer; FIXME: total wired (without fee), or including @a wire_fee? + * Actual amount of the wire transfer, excluding the wire fee. */ struct TALER_Amount total_amount; diff --git a/src/lib/exchange_api_transfers_get.c b/src/lib/exchange_api_transfers_get.c index dd9b64467..6b5bba8e8 100644 --- a/src/lib/exchange_api_transfers_get.c +++ b/src/lib/exchange_api_transfers_get.c @@ -155,6 +155,12 @@ check_transfers_get_response_ok ( GNUNET_JSON_parse (detail_j, spec_detail, NULL, NULL)) || + (GNUNET_OK != + TALER_amount_cmp_currency (&total_expected, + &detail->coin_value)) || + (GNUNET_OK != + TALER_amount_cmp_currency (&total_expected, + &detail->coin_fee)) || (0 > TALER_amount_add (&total_expected, &total_expected, |