From efc299d5424ca497b25fa0f4ba7db22d055ae317 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 12:49:39 -0800 Subject: [PATCH] fix: standardize error display to use showError/hideError helpers Replaces four inconsistent error display patterns with the centralized showError()/hideError() helpers from helpers.js: - approval.js: replace direct classList toggling on approve-tx-error and approve-sign-error with showError()/hideError() - addressDetail.js: rename export-privkey-flash to export-privkey-error, use showError()/hideError() instead of direct DOM manipulation - deleteWallet.js: rename delete-wallet-flash to delete-wallet-error, use showError()/hideError() instead of direct DOM with text-red-500 - addWallet.js: replace showFlash() validation errors with dedicated add-wallet-error div and showError() (keep showFlash for status msgs) - importKey.js: replace showFlash() validation errors with dedicated import-key-error div and showError() - index.html: add error divs with min-h-[1.25rem] for add-wallet, import-key views; update existing error divs to use consistent min-h-[1.25rem] class instead of hidden class Closes #87 --- src/popup/index.html | 26 ++++++++++++++++++++------ src/popup/views/addWallet.js | 26 ++++++++++++++++++-------- 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, 70 insertions(+), 47 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index d5bbf90..9dc2746 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -104,6 +104,10 @@ class="border border-border p-1 w-full font-mono text-sm bg-bg text-fg" /> +