[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated: early stop when currency doesn't mat
From: |
gnunet |
Subject: |
[taler-bank] branch master updated: early stop when currency doesn't match |
Date: |
Thu, 10 Jun 2021 16:30:32 +0200 |
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 a58cbb5 early stop when currency doesn't match
a58cbb5 is described below
commit a58cbb5129b94b995f9cecd6b6521ca349c9cf6c
Author: MS <ms@taler.net>
AuthorDate: Thu Jun 10 16:30:28 2021 +0200
early stop when currency doesn't match
---
talerbank/app/views.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 63387b7..f75d08b 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -905,6 +905,16 @@ def twg_add_incoming(request, user_account, acct_id):
debit_account = BankAccount.objects.get(user=debit_user)
subject = f"{reserve_pub}"
+ # check if currency is acceptable
+ if amount.currency != settings.TALER_CURRENCY:
+ return JsonResponse(
+ {
+ "code": 30, # TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT
+ "hint": "The specified currency is not supported."
+ },
+ status=HTTPStatus.CONFLICT
+ )
+
# check if reserve pub exists already.
try:
BankTransaction.objects.get(subject=subject)
--
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: early stop when currency doesn't match,
gnunet <=