diff --git a/main.py b/main.py index f947dc8..7cc393e 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,10 @@ import gift app = Flask(__name__) dotenv.load_dotenv() +address = 'hs1qr7d0xqsyatls47jf28gvm97twe8k606gspfpsz' +if os.getenv('address') != None: + address = os.getenv('address') #Assets routes @app.route('/assets/') @@ -20,9 +23,9 @@ def index(): params = request.args if 'r' in params: print("Referer: " + params['r']) - return render_template('index.html', hidden=params['r']) + return render_template('index.html', hidden=params['r'],address=address) - return render_template('index.html') + return render_template('index.html',address=address) @app.route('/', methods=['POST']) @@ -47,9 +50,9 @@ def submit(): print(status,flush=True) if status == True: - return render_template('success.html') + return render_template('success.html',address=address) else: - return render_template('error.html',error=status) + return render_template('error.html',error=status,address=address) # Special routes @app.route('/.well-known/wallets/') diff --git a/templates/error.html b/templates/error.html index 74f7dde..2e6b67a 100644 --- a/templates/error.html +++ b/templates/error.html @@ -30,7 +30,7 @@ Claim a free Handshake domain"> - + @@ -53,6 +53,12 @@ Claim a free Handshake domain"> +
+
+

Donate to fund the faucet

+

{{address}}

+
+
diff --git a/templates/index.html b/templates/index.html index 2f1557a..7e2e056 100644 --- a/templates/index.html +++ b/templates/index.html @@ -38,7 +38,7 @@ Claim a free Handshake domain"> - + @@ -61,6 +61,12 @@ Claim a free Handshake domain">
+
+
+

Donate to fund the faucet

+

{{address}}

+
+
diff --git a/templates/success.html b/templates/success.html index a37de87..6ce912a 100644 --- a/templates/success.html +++ b/templates/success.html @@ -30,11 +30,11 @@ Claim a free Handshake domain"> - + -
+
@@ -52,6 +52,12 @@ Claim a free Handshake domain">
+
+
+

Donate to fund the faucet

+

{{address}}

+
+