aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_reserves_history.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-21 03:59:31 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-21 03:59:31 +0100
commitc7e2d206bab7f06375be2154b323ad429d13a9e7 (patch)
tree969cc459e34e9cc88074269e272fd27be38f01f5 /src/lib/exchange_api_reserves_history.c
parent1f86b02ffa60e3817f6a7d70a654f02759e793f3 (diff)
downloadexchange-c7e2d206bab7f06375be2154b323ad429d13a9e7.tar.xz
add logic to check timestamp, revise history balance calculation logic in client
Diffstat (limited to 'src/lib/exchange_api_reserves_history.c')
-rw-r--r--src/lib/exchange_api_reserves_history.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/exchange_api_reserves_history.c b/src/lib/exchange_api_reserves_history.c
index c0f6c42d2..d9c42d691 100644
--- a/src/lib/exchange_api_reserves_history.c
+++ b/src/lib/exchange_api_reserves_history.c
@@ -91,7 +91,6 @@ handle_reserves_history_ok (struct TALER_EXCHANGE_ReservesHistoryHandle *rsh,
{
json_t *history;
unsigned int len;
- struct TALER_Amount history_balance;
struct TALER_EXCHANGE_ReserveHistory rs = {
.hr.reply = j,
.hr.http_status = MHD_HTTP_OK
@@ -123,15 +122,13 @@ handle_reserves_history_ok (struct TALER_EXCHANGE_ReservesHistoryHandle *rsh,
rhistory = GNUNET_new_array (len,
struct TALER_EXCHANGE_ReserveHistoryEntry);
- // FIXME: even this history could be partial
- // (if the reserve is too old!); update API
- // and return incoming & outgoing totals separately?
if (GNUNET_OK !=
TALER_EXCHANGE_parse_reserve_history (rsh->exchange,
history,
&rsh->reserve_pub,
rs.details.ok.balance.currency,
- &history_balance,
+ &rs.details.ok.total_in,
+ &rs.details.ok.total_out,
len,
rhistory))
{