In approval.js, the showTxApproval() function does not clear the #approve-tx-password field when the view is shown. By contrast, showSignApproval() does clear #approve-sign-password (line 344), and confirmTx.show() clears #confirm-tx-password.
This means if a user enters a wrong password on a transaction approval, navigates away, and comes back, the old password text may still be present.
Expected behavior
All password fields should be cleared when their view is shown.
## Problem
In `approval.js`, the `showTxApproval()` function does not clear the `#approve-tx-password` field when the view is shown. By contrast, `showSignApproval()` does clear `#approve-sign-password` (line 344), and `confirmTx.show()` clears `#confirm-tx-password`.
This means if a user enters a wrong password on a transaction approval, navigates away, and comes back, the old password text may still be present.
## Expected behavior
All password fields should be cleared when their view is shown.
## Files affected
- `src/popup/views/approval.js` (`showTxApproval()` function)
## Suggested fix
Add `$("approve-tx-password").value = "";` and `$("approve-tx-error").classList.add("hidden");` to the `showTxApproval()` function.
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
In
approval.js, theshowTxApproval()function does not clear the#approve-tx-passwordfield when the view is shown. By contrast,showSignApproval()does clear#approve-sign-password(line 344), andconfirmTx.show()clears#confirm-tx-password.This means if a user enters a wrong password on a transaction approval, navigates away, and comes back, the old password text may still be present.
Expected behavior
All password fields should be cleared when their view is shown.
Files affected
src/popup/views/approval.js(showTxApproval()function)Suggested fix
Add
$("approve-tx-password").value = "";and$("approve-tx-error").classList.add("hidden");to theshowTxApproval()function.Found during consistency audit for #78.