[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated: headless withdrawal
From: |
gnunet |
Subject: |
[taler-bank] branch master updated: headless withdrawal |
Date: |
Mon, 27 Jul 2020 16:06:47 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 7804de5 headless withdrawal
7804de5 is described below
commit 7804de5757cc0966ef6afe072a3e5814f26862a8
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Mon Jul 27 19:36:23 2020 +0530
headless withdrawal
---
talerbank/app/views.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index b7d0600..261dd17 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -944,8 +944,8 @@ def withdraw_headless_uri(request, user):
user_account = BankAccount.objects.get(user=user)
withdraw_amount = SignedAmount(True, amount)
debt_threshold = SignedAmount.parse(settings.TALER_MAX_DEBT)
- user_balance = SignedAmount(not user_account.debit, user_account.amount)
- if user_balance - amount < -debt_threshold:
+ user_balance = user_account.balance
+ if user_balance - withdraw_amount < -debt_threshold:
raise DebitLimitException(
f"Aborting payment initiated by '{user_account.user.username}',
debit limit {debt_threshold} crossed."
)
@@ -1271,7 +1271,7 @@ def bank_accounts_api_create_withdrawal(request, user,
acct_id):
op = TalerWithdrawOperation(amount=amount, withdraw_account=user_account)
op.save()
host = request.get_host()
- taler_withdraw_uri = f"taler://withdraw/{host}/-/{op.withdraw_id}"
+ taler_withdraw_uri = f"taler://withdraw/{host}/{op.withdraw_id}"
return JsonResponse(
{"taler_withdraw_uri": taler_withdraw_uri, "withdrawal_id":
op.withdraw_id}
)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-bank] branch master updated: headless withdrawal,
gnunet <=