clarify with/without wire fee issue, sanity checks on currencies

This commit is contained in:
Christian Grothoff 2020-06-23 10:30:31 +02:00
parent e01bcbb2d4
commit dc9f41a794
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 7 additions and 1 deletions

View File

@ -1611,7 +1611,7 @@ struct TALER_EXCHANGE_TransferData
struct GNUNET_TIME_Absolute execution_time; 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; struct TALER_Amount total_amount;

View File

@ -155,6 +155,12 @@ check_transfers_get_response_ok (
GNUNET_JSON_parse (detail_j, GNUNET_JSON_parse (detail_j,
spec_detail, spec_detail,
NULL, NULL)) || 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 > (0 >
TALER_amount_add (&total_expected, TALER_amount_add (&total_expected,
&total_expected, &total_expected,