summaryrefslogtreecommitdiff
path: root/talerbank/app/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'talerbank/app/views.py')
-rw-r--r--talerbank/app/views.py10
1 files changed, 10 insertions, 0 deletions
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)