summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-23 10:30:31 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:50:15 +0200
commitdc9f41a7940a540df9d6f9a1d1b3a01c96176b11 (patch)
tree7386edf003a8cde889da1ed7ecd1242c21351f8f /src
parente01bcbb2d4d7922829da20a75b4b18ffa8b1c374 (diff)
downloadexchange-dc9f41a7940a540df9d6f9a1d1b3a01c96176b11.tar.gz
exchange-dc9f41a7940a540df9d6f9a1d1b3a01c96176b11.tar.bz2
exchange-dc9f41a7940a540df9d6f9a1d1b3a01c96176b11.zip
clarify with/without wire fee issue, sanity checks on currencies
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_exchange_service.h2
-rw-r--r--src/lib/exchange_api_transfers_get.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 07998702..e61a07c9 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 dd9b6446..6b5bba8e 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,