fix: Cleanup the ui for invalid cryptos

This commit is contained in:
Nathan Woodburn 2024-04-19 20:23:22 +10:00
parent d58a6196eb
commit 095f74773c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -304,7 +304,7 @@ def donate():
cryptoHTML += f'<br>Donate with {token["name"]} {"("+token["symbol"]+")" if token["symbol"] != token["name"] else ""}{" on "+crypto if crypto != "NULL" else ""}:' cryptoHTML += f'<br>Donate with {token["name"]} {"("+token["symbol"]+")" if token["symbol"] != token["name"] else ""}{" on "+crypto if crypto != "NULL" else ""}:'
cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{address}</code>' cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{address}</code>'
else: else:
cryptoHTML += f'<br>Invalid token: {token["name"]} ({token["symbol"]})<br>' cryptoHTML += f'<br>Invalid coin: {crypto}<br>'
else: else:
cryptoHTML += f'<br>Invalid coin: {crypto}<br>' cryptoHTML += f'<br>Invalid coin: {crypto}<br>'
@ -320,7 +320,7 @@ def donate():
domain = domains[crypto] domain = domains[crypto]
cryptoHTML += '<br>Or send to this domain on compatible wallets:<br>' cryptoHTML += '<br>Or send to this domain on compatible wallets:<br>'
cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-domain" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{domain}</code>' cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-domain" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{domain}</code>'
if address:
cryptoHTML += '<img src="/qrcode/' + address + '" alt="QR Code" style="width: 100%; max-width: 200px; margin: 20px auto;">' cryptoHTML += '<img src="/qrcode/' + address + '" alt="QR Code" style="width: 100%; max-width: 200px; margin: 20px auto;">'