From d58a6196eb7310870a7f9f37c495bd6c4e545798 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 19 Apr 2024 20:15:10 +1000 Subject: [PATCH] feat: Add btc lightning to crypto options --- .well-known/wallets/.tokens | 6 ++++++ server.py | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.well-known/wallets/.tokens b/.well-known/wallets/.tokens index c1c92e5..7adecd7 100644 --- a/.well-known/wallets/.tokens +++ b/.well-known/wallets/.tokens @@ -58,5 +58,11 @@ "symbol": "CAKE", "name": "PancakeSwap", "chain": "BNB" + }, + { + "symbol": "BTC", + "name": "Bitcoin Lightning", + "chain": "null", + "address": "hushedmercury55@walletofsatoshi.com" } ] \ No newline at end of file diff --git a/server.py b/server.py index 425f4a4..7065ab3 100644 --- a/server.py +++ b/server.py @@ -262,7 +262,10 @@ def donate(): coins += f'{file}' for token in tokenList: - coins += f'' + if token["chain"] != 'null': + coins += f'' + else: + coins += f'' crypto = request.args.get('c') if not crypto: @@ -295,6 +298,13 @@ def donate(): else: cryptoHTML += f'
Donate with {token["name"]} {"("+token["symbol"]+") " if token["symbol"] != token["name"] else ""}on {crypto}:' cryptoHTML += f'{address}' + elif token: + if 'address' in token: + address = token['address'] + cryptoHTML += f'
Donate with {token["name"]} {"("+token["symbol"]+")" if token["symbol"] != token["name"] else ""}{" on "+crypto if crypto != "NULL" else ""}:' + cryptoHTML += f'{address}' + else: + cryptoHTML += f'
Invalid token: {token["name"]} ({token["symbol"]})
' else: cryptoHTML += f'
Invalid coin: {crypto}
'