gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-bank] branch master updated: supporting both t_m and t_ms


From: gnunet
Subject: [taler-bank] branch master updated: supporting both t_m and t_ms
Date: Wed, 15 Dec 2021 21:56:08 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new e6294e1  supporting both t_m and t_ms
e6294e1 is described below

commit e6294e1ca0634458b480f75d2cfe3317262e282e
Author: ms <ms@taler.net>
AuthorDate: Wed Dec 15 21:55:59 2021 +0100

    supporting both t_m and t_ms
---
 talerbank/app/views.py | 31 +++++++++++++++++++++++--------
 1 file 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),

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]