diff options
-rw-r--r-- | talerbank/app/views.py | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/talerbank/app/views.py b/talerbank/app/views.py index 0154a6b..ee2f8fd 100644 --- a/talerbank/app/views.py +++ b/talerbank/app/views.py @@ -588,7 +588,7 @@ def config_view(request): """ return JsonResponse( dict( - version="1:0:0", currency=settings.TALER_CURRENCY, name="taler-bank-access" + version="1:0:1", currency=settings.TALER_CURRENCY, name="taler-bank-access" ), status=HTTPStatus.OK, ) @@ -602,7 +602,7 @@ def api_config(request): """ return JsonResponse( dict( - version="1:0:0", + version="1:0:1", currency=settings.TALER_CURRENCY, name="taler-bank-integration", ), @@ -788,7 +788,10 @@ def build_history_response(qs, cancelled, user_account): sign=sign_, wt_subject=entry.subject, row_id=entry.id, - date=dict(t_m=int(entry.date.timestamp())), + date=dict( + t_m=int(entry.date.timestamp()), + t_ms=int(entry.date.timestamp() * 1000) + ), ) ) return history @@ -869,7 +872,7 @@ def twg_config(request, acct_id): """ return JsonResponse( dict( - version="1:0:0", + version="1:0:1", name="taler-wire-gateway", currency=settings.TALER_CURRENCY, ), @@ -930,7 +933,10 @@ def twg_add_incoming(request, user_account, acct_id): return JsonResponse( { "row_id": wtrans.id, - "timestamp": dict(t_m=(int(wtrans.date.timestamp()))), + "timestamp": dict( + t_m=(int(wtrans.date.timestamp())), + t_ms=(int(wtrans.date.timestamp()) * 1000) + ), } ) # Here means this public key was used already: must fail. @@ -988,7 +994,10 @@ def twg_transfer(request, user_account, acct_id): return JsonResponse( { "row_id": wtrans.id, - "timestamp": dict(t_m=(int(wtrans.date.timestamp()))), + "timestamp": dict( + t_m=(int(wtrans.date.timestamp())), + t_ms=(int(wtrans.date.timestamp()) * 1000) + ), } ) @@ -1037,7 +1046,10 @@ def twg_history_incoming(request, user_account, acct_id): dict( row_id=item.id, amount=item.amount.stringify(settings.TALER_DIGITS), - date=dict(t_m=(int(item.date.timestamp()))), + date=dict( + t_m=(int(item.date.timestamp())), + t_ms=(int(item.date.timestamp()) * 1000) + ), reserve_pub=rp, credit_account=get_payto_from_account(request, item.credit_account), debit_account=get_payto_from_account(request, item.debit_account), @@ -1069,7 +1081,10 @@ def twg_history_outgoing(request, user_account, acct_id): dict( row_id=item.id, amount=item.amount.stringify(settings.TALER_DIGITS), - date=dict(t_m=(int(item.date.timestamp()))), + date=dict( + t_m=(int(item.date.timestamp())), + t_ms=(int(item.date.timestamp()) * 1000) + ), wtid=wtid, exchange_base_url=exchange_base_url, credit_account=get_payto_from_account(request, item.credit_account), |