From 5e4cf34ef88e06a931f410de1cd83b22c9154087 Mon Sep 17 00:00:00 2001 From: clawbot Date: Sat, 28 Feb 2026 13:06:47 -0800 Subject: [PATCH] fix: standardize error display to use showError/hideError helpers Replace three inconsistent error display patterns with the centralized showError()/hideError() helpers from helpers.js: - approval.js: replace direct DOM classList toggling for approve-tx-error and approve-sign-error with showError/hideError calls - addressDetail.js: replace export-privkey-flash direct DOM with showError/hideError using renamed export-privkey-error element - deleteWallet.js: replace delete-wallet-flash direct DOM with showError/hideError using renamed delete-wallet-error element - addWallet.js: replace showFlash() validation errors with dedicated add-wallet-error div and showError/hideError calls - importKey.js: replace showFlash() validation errors with dedicated import-key-error div and showError/hideError calls - index.html: add error divs for add-wallet and import-key views, rename export-privkey-flash to export-privkey-error, rename delete-wallet-flash to delete-wallet-error, remove inconsistent text-red-500 class Closes #87 --- src/popup/index.html | 9 ++++----- src/popup/views/addWallet.js | 27 +++++++++++++++++++-------- src/popup/views/addressDetail.js | 13 ++++++------- src/popup/views/approval.js | 17 ++++++++--------- src/popup/views/deleteWallet.js | 19 ++++++++----------- src/popup/views/importKey.js | 16 ++++++++++------ 6 files changed, 55 insertions(+), 46 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index d5bbf90..0197dd8 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -104,6 +104,7 @@ class="border border-border p-1 w-full font-mono text-sm bg-bg text-fg" /> +