Password validation errors are displayed using three different patterns across the codebase:
showError()/hideError() helpers with min-height error div (used by confirm-tx)
Direct DOM manipulation with hidden class toggling (used by approve-tx, approve-sign)
Global flash message system via showFlash() (used by add-wallet, import-key)
Per-view flash divs with inconsistent styling (used by export-privkey with export-privkey-flash, delete-wallet with delete-wallet-flash using text-red-500)
Expected behavior
All password error displays should use a consistent pattern. The showError()/hideError() helper approach with min-height error divs prevents layout shift and centralizes the logic.
Files affected
src/popup/views/approval.js (direct DOM for approve-tx-error, approve-sign-error)
## Problem
Password validation errors are displayed using three different patterns across the codebase:
1. **`showError()`/`hideError()` helpers** with `min-height` error div (used by `confirm-tx`)
2. **Direct DOM manipulation** with `hidden` class toggling (used by `approve-tx`, `approve-sign`)
3. **Global flash message system** via `showFlash()` (used by `add-wallet`, `import-key`)
4. **Per-view flash divs** with inconsistent styling (used by `export-privkey` with `export-privkey-flash`, `delete-wallet` with `delete-wallet-flash` using `text-red-500`)
## Expected behavior
All password error displays should use a consistent pattern. The `showError()`/`hideError()` helper approach with `min-height` error divs prevents layout shift and centralizes the logic.
## Files affected
- `src/popup/views/approval.js` (direct DOM for approve-tx-error, approve-sign-error)
- `src/popup/views/addressDetail.js` (export-privkey-flash)
- `src/popup/views/deleteWallet.js` (delete-wallet-flash with text-red-500)
- `src/popup/views/addWallet.js` (global showFlash)
- `src/popup/views/importKey.js` (global showFlash)
- `src/popup/index.html` (error div markup)
## Suggested fix
Standardize all password error areas to use dedicated error divs with `min-h-[1.25rem]` and the `showError()`/`hideError()` helpers from `helpers.js`.
Found during consistency audit for #78.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Password validation errors are displayed using three different patterns across the codebase:
showError()/hideError()helpers withmin-heighterror div (used byconfirm-tx)hiddenclass toggling (used byapprove-tx,approve-sign)showFlash()(used byadd-wallet,import-key)export-privkeywithexport-privkey-flash,delete-walletwithdelete-wallet-flashusingtext-red-500)Expected behavior
All password error displays should use a consistent pattern. The
showError()/hideError()helper approach withmin-heighterror divs prevents layout shift and centralizes the logic.Files affected
src/popup/views/approval.js(direct DOM for approve-tx-error, approve-sign-error)src/popup/views/addressDetail.js(export-privkey-flash)src/popup/views/deleteWallet.js(delete-wallet-flash with text-red-500)src/popup/views/addWallet.js(global showFlash)src/popup/views/importKey.js(global showFlash)src/popup/index.html(error div markup)Suggested fix
Standardize all password error areas to use dedicated error divs with
min-h-[1.25rem]and theshowError()/hideError()helpers fromhelpers.js.Found during consistency audit for #78.
Covered by PR #92 (merged) which standardized error divs to use
showError/hideErrorwithmin-height.