summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-28 20:46:57 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-28 20:46:57 +0100
commitae9f751a7cddeeb27fda10921fa47c1fa0260bac (patch)
tree93a42a929853b8011246c074fd83d20dd3e0d1db /src/lib/exchange_api_common.c
parent82b18857e2c71d340acaf17bdff02d6a7a53a2ce (diff)
downloadexchange-ae9f751a7cddeeb27fda10921fa47c1fa0260bac.tar.gz
exchange-ae9f751a7cddeeb27fda10921fa47c1fa0260bac.tar.bz2
exchange-ae9f751a7cddeeb27fda10921fa47c1fa0260bac.zip
do return fees in history
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r--src/lib/exchange_api_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 70d1432f..2748b8fc 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -109,7 +109,7 @@ TALER_EXCHANGE_parse_reserve_history (
GNUNET_JSON_spec_end ()
};
- rhistory[off].type = TALER_EXCHANGE_RTT_DEPOSIT;
+ rhistory[off].type = TALER_EXCHANGE_RTT_CREDIT;
if (GNUNET_OK !=
TALER_amount_add (&total_in,
&total_in,
@@ -201,8 +201,9 @@ TALER_EXCHANGE_parse_reserve_history (
GNUNET_JSON_parse_free (withdraw_spec);
return GNUNET_SYSERR;
}
+ rhistory[off].details.withdraw.fee = fee;
}
- rhistory[off].details.out_authorization_sig
+ rhistory[off].details.withdraw.out_authorization_sig
= json_object_get (transaction,
"signature");
/* Check check that the same withdraw transaction
@@ -355,7 +356,8 @@ TALER_EXCHANGE_parse_reserve_history (
rcc.reserve_pub = *reserve_pub;
timestamp = GNUNET_TIME_absolute_ntoh (rcc.timestamp);
rhistory[off].details.close_details.timestamp = timestamp;
-
+ TALER_amount_ntoh (&rhistory[off].details.close_details.fee,
+ &rcc.closing_fee);
key_state = TALER_EXCHANGE_get_keys (exchange);
if (GNUNET_OK !=
TALER_EXCHANGE_test_signing_key (key_state,
@@ -424,7 +426,7 @@ TALER_EXCHANGE_free_reserve_history (
{
switch (rhistory[i].type)
{
- case TALER_EXCHANGE_RTT_DEPOSIT:
+ case TALER_EXCHANGE_RTT_CREDIT:
GNUNET_free_non_null (rhistory[i].details.in_details.wire_reference);
GNUNET_free_non_null (rhistory[i].details.in_details.sender_url);
break;