From 7fc19a7f1974b775a978765e645fffd13083bedc Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 11 Sep 2025 15:07:19 +1000 Subject: [PATCH] fix: Don't allow alerts without an ID to be dismissed --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 850e9ad..03d6644 100644 --- a/main.py +++ b/main.py @@ -74,8 +74,9 @@ def index(): alerts = get_alerts(account) for alert in alerts: output_html = alert['output'] - # Add a dismiss button - output_html += f" Dismiss" + if 'id' in alert: + # Add a dismiss button + output_html += f" Dismiss" plugins += render_template('components/dashboard-alert.html', name=alert['name'], output=output_html) return render_template("index.html", account=account, plugins=plugins) @@ -1920,7 +1921,7 @@ def get_alerts(account:str) -> list: logger.info("New version available") alerts.append({ "name": "Update Available", - "output": f"A new version of FireWallet is available. Changelog." + "output": f"A new version of FireWallet is available. Changelog" })