summaryrefslogtreecommitdiff
path: root/src/bank-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib')
-rw-r--r--src/bank-lib/fakebank.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 56af11f8a..47a06c59c 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -972,8 +972,13 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
const char *account)
{
struct HistoryArgs ha;
- struct Transaction *pos;
+ const struct Transaction *pos;
json_t *history;
+ struct TALER_Amount total_incoming;
+ struct TALER_Amount start_outgoing;
+ struct TALER_Amount end_outgoing;
+ const struct Transaction *start_pos;
+ const struct Transaction *end_pos;
if (GNUNET_OK !=
parse_history_common_args (connection,
@@ -1014,6 +1019,11 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
/* list is empty */
pos = NULL;
}
+ if (0 > ha.delta)
+ end_pos = pos;
+ else
+ start_pos = pos;
+
history = json_array ();
while ( (0 != ha.delta) &&
(NULL != pos) )
@@ -1065,6 +1075,14 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
if (0 < ha.delta)
pos = pos->next;
}
+ if (0 > ha.delta)
+ start_pos = pos;
+ else
+ end_pos = pos;
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (fb->currency,
+ &));
+
return TALER_MHD_reply_json_pack (connection,
MHD_HTTP_OK,
"{s:o}",