[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: Minor fixes on debit mg
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: Minor fixes on debit mgmt. |
Date: |
Thu, 23 Mar 2017 20:38:20 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 573b2cc Minor fixes on debit mgmt.
573b2cc is described below
commit 573b2cc07ea72f2793185b19b380fd5390c64218
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 23 20:38:07 2017 +0100
Minor fixes on debit mgmt.
---
talerbank/app/static/web-common | 2 +-
talerbank/app/views.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/talerbank/app/static/web-common b/talerbank/app/static/web-common
index dc9d5ab..d7e0135 160000
--- a/talerbank/app/static/web-common
+++ b/talerbank/app/static/web-common
@@ -1 +1 @@
-Subproject commit dc9d5ab2308fef7cdd1e8c95fbf4fdd51bed7bfb
+Subproject commit d7e013594d15388b1a7342a44a0e9c8d4ecca82d
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 945b984..5cd1ad8 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -216,7 +216,7 @@ def pin_tan_verify(request):
json_body = dict(
reserve_pub=reserve_pub,
execution_date="/Date(" + str(int(time.time())) + ")/",
- sender_account_details=sender_account_details,
+ sender_account_details=sender_wiredetails,
# just something unique
transfer_details=dict(timestamp=int(time.time() * 1000)),
amount=amount,
@@ -226,6 +226,7 @@ def pin_tan_verify(request):
try:
wire_transfer(amount, user_account, exchange_account, reserve_pub)
except DebtLimitExceededException:
+ logger.warning("Withdrawal impossible due to debt limit exceeded")
request.session["debt_limit"] = True
return redirect("profile")
@@ -432,7 +433,8 @@ def wire_transfer(amount,
threshold = amounts.parse_amount(settings.TALER_MAX_DEBT_BANK)
if 1 == amounts.amount_cmp(debit_account.balance_obj, threshold) \
- and 0 != amounts.amount_cmp(amounts.get_zero(), threshold):
+ and 0 != amounts.amount_cmp(amounts.get_zero(), threshold) \
+ and debit_account.debit:
logger.error("Negative balance '%s' not allowed." %
json.dumps(debit_account.balance_obj))
logger.info("%s's threshold is: '%s'." % (debit_account.user.username,
json.dumps(threshold)))
raise DebtLimitExceededException()
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: Minor fixes on debit mgmt.,
gnunet <=