diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-22 15:48:44 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-22 15:48:44 +0100 |
commit | 2b9e3608fe308261936694d8571049a07d1777a0 (patch) | |
tree | c1652a084d59065da9262c3319c73d3fc2d51796 | |
parent | 8fc7a693a44c699295873a60a8571a5ea99fb971 (diff) | |
download | bank-2b9e3608fe308261936694d8571049a07d1777a0.tar.gz bank-2b9e3608fe308261936694d8571049a07d1777a0.tar.bz2 bank-2b9e3608fe308261936694d8571049a07d1777a0.zip |
remove TALER_SUGGESTED_EXCHANGE_PAYTO
-rw-r--r-- | talerbank/app/schemas.py | 2 | ||||
-rw-r--r-- | talerbank/app/views.py | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/talerbank/app/schemas.py b/talerbank/app/schemas.py index 291ec5b..6c08acf 100644 --- a/talerbank/app/schemas.py +++ b/talerbank/app/schemas.py @@ -238,7 +238,7 @@ class WithdrawHeadless(BankValidator): ] ) reserve_pub = forms.CharField(required=True) - exchange_wire_details = PaytoField(required=False) + exchange_payto_uri = PaytoField(required=True) class WithdrawHeadlessUri(BankValidator): diff --git a/talerbank/app/views.py b/talerbank/app/views.py index f3fdbcc..35a503d 100644 --- a/talerbank/app/views.py +++ b/talerbank/app/views.py @@ -966,12 +966,10 @@ def withdraw_headless(request, user): sender_payto = f"payto://x-taler-bank/{h}/{user.username}" ret_obj = {"sender_wire_details": sender_payto} - exchange_payto = data.get("exchange_wire_details") + exchange_payto = data.get("exchange_payto_uri") if not exchange_payto: - exchange_accno = get_acct_from_payto(settings.TALER_SUGGESTED_EXCHANGE_PAYTO) - ret_obj.update(exchange_url=settings.TALER_SUGGESTED_EXCHANGE) - else: - exchange_accno = get_acct_from_payto(exchange_payto) + return JsonResponse(dict(hint="exchange_payto_uri missig") + exchange_accno = get_acct_from_payto(exchange_payto) try: exchange_bankaccount = BankAccount.objects.get(account_no=exchange_accno) |