diff options
author | Antoine A <> | 2024-03-05 18:18:59 +0100 |
---|---|---|
committer | Antoine A <> | 2024-03-05 18:18:59 +0100 |
commit | a2916c92f1947c7f25a04d8f10c6aba937c6ebe5 (patch) | |
tree | a741539b4a7979ccc6fbd82ea34327b38975a7ae | |
parent | 0b72f03ffa2d6f59963f084eed3bbc463e458d89 (diff) | |
download | deployment-a2916c92f1947c7f25a04d8f10c6aba937c6ebe5.tar.gz deployment-a2916c92f1947c7f25a04d8f10c6aba937c6ebe5.tar.bz2 deployment-a2916c92f1947c7f25a04d8f10c6aba937c6ebe5.zip |
regio: prefixed tan code and libeufin-bank name config
-rwxr-xr-x | regional-currency/ask_questions.py | 6 | ||||
-rwxr-xr-x | regional-currency/setup-libeufin.sh | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/regional-currency/ask_questions.py b/regional-currency/ask_questions.py index c3b9875..7b9b9b8 100755 --- a/regional-currency/ask_questions.py +++ b/regional-currency/ask_questions.py @@ -273,7 +273,7 @@ if do_conversion: ) params = urllib.parse.urlencode({"receiver-name": name}) add_conf("CONVERSION_PAYTO", f"payto://iban/{bic}/{iban}?{params}") -ask_str( +bank_name = ask_str( "BANK_NAME", "3. Enter the human-readable name of the bank (e.g. 'Taler Bank'): ", "Taler Bank", @@ -321,7 +321,7 @@ if ask_yes_no( auth_token = base64.b64encode(f"{customer_id}:{api_key}".encode()).decode() if not try_cmd( ["libeufin-tan-sms.sh", phone_number], - "12345 is your verification code for GNU Taler setup", + f"T-12345 is your verification code for {bank_name} setup", {**os.environ, "AUTH_TOKEN": auth_token}, ): print( @@ -329,7 +329,7 @@ if ask_yes_no( ) return None code = ask_str(None, f"6.4. Enter the code received by {phone_number} : ") - if code != "12345": + if code != "12345" and code != "T-12345": print( f"Wrong code got '{code}' expected '12345', check your credentials and phone number" ) diff --git a/regional-currency/setup-libeufin.sh b/regional-currency/setup-libeufin.sh index 38d89da..ed12119 100755 --- a/regional-currency/setup-libeufin.sh +++ b/regional-currency/setup-libeufin.sh @@ -48,6 +48,7 @@ say "Configuring libeufin-bank with ${CURRENCY}..." cat >/etc/libeufin/libeufin-bank.conf <<EOF [libeufin-bank] CURRENCY=${CURRENCY} +NAME="${BANK_NAME}" WIRE_TYPE=x-taler-bank X_TALER_BANK_PAYTO_HOSTNAME=bank.${DOMAIN_NAME} SUGGESTED_WITHDRAWAL_EXCHANGE=${PROTO}://exchange.${DOMAIN_NAME} |