Disable BTCPay in the interface, if BTCPAY_PRIVATE_KEY is un-set #3

Merged
3wordchant merged 4 commits from optional-btcpay into master 2021-07-21 18:20:41 +00:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit 7ed847251f - Show all commits

View File

@ -48,6 +48,10 @@ def validate_dollars():
def btcpay_payment():
errors = list()
if current_app.config['BTCPAY_PRIVATE_KEY'] == "":
flash("BTCPay is not enabled on this server")
return redirect(url_for("console.account_balance"))
if request.method == "POST":
result = validate_dollars()
errors = result[0]