Adds validation on the To address field in the send view before allowing the user to proceed to review.
## Changes
- Validate Ethereum addresses (0x prefix + 40 hex chars)
- EIP-55 checksum validation for mixed-case addresses (all-lowercase accepted)
- Basic ENS name format validation
- Block sending to the zero address
- Warn (but allow) sending to own address
- Inline error message with reserved height (no layout shift)
- Review button disabled while address is invalid
- Re-validation on click as safety net
Closes #67
sneak
was assigned by clawbot2026-02-28 20:42:17 +01:00
- Validate Ethereum addresses (0x + 40 hex chars) and ENS names
- EIP-55 checksum validation for mixed-case addresses
- Block sending to zero address (0x0000...0000)
- Warn when sending to own address (allow but show warning)
- Inline error messages with reserved space (no layout shift)
- Disable Review button while address is invalid
Closes#67
Rebased onto main to resolve merge conflict in src/popup/views/send.js (the TOKEN_BY_ADDRESS → resolveSymbol rename). Resolution keeps resolveSymbol import from main and adds the ethers import + validation code from this branch.
docker build . passes (lint, format, build all green).
Rebased onto main to resolve merge conflict in `src/popup/views/send.js` (the `TOKEN_BY_ADDRESS` → `resolveSymbol` rename). Resolution keeps `resolveSymbol` import from main and adds the `ethers` import + validation code from this branch.
`docker build .` passes (lint, format, build all green).
Code review passed. The validation implementation is thorough:
Ethereum address format validation (0x + 40 hex chars)
EIP-55 checksum validation via ethers getAddress
Zero address rejection
ENS name format check (resolution delegated to provider)
Own-address warning (non-blocking)
Clean UI: inline error with reserved space (no layout shift), review button disabled while invalid
Re-validation on button click as defense-in-depth
docker build . passes (lint, format, build all green). Assigning to @sneak for merge.
**Review: ✅ Approved — merge-ready**
Code review passed. The validation implementation is thorough:
- Ethereum address format validation (0x + 40 hex chars)
- EIP-55 checksum validation via ethers `getAddress`
- Zero address rejection
- ENS name format check (resolution delegated to provider)
- Own-address warning (non-blocking)
- Clean UI: inline error with reserved space (no layout shift), review button disabled while invalid
- Re-validation on button click as defense-in-depth
`docker build .` passes (lint, format, build all green). Assigning to @sneak for merge.
after leaving the send view, the warning/error field is not reset, so returning to send even when the destination field is empty, an error or warning remains.
after leaving the `send` view, the warning/error field is not reset, so returning to `send` even when the destination field is empty, an error or warning remains.
Rework complete. Fixed the validation state persistence bug.
Changes
Added resetSendValidation() to send.js — clears the error/warning text and disables the review button
Called resetSendValidation() when navigating to the send view from home, address detail, and address token views
Navigating back from confirm-tx intentionally preserves form state (user is returning to their in-progress form)
docker build . passes (lint, format, build all green).
**Rework complete.** Fixed the validation state persistence bug.
### Changes
- Added `resetSendValidation()` to `send.js` — clears the error/warning text and disables the review button
- Called `resetSendValidation()` when navigating to the send view from home, address detail, and address token views
- Navigating back from confirm-tx intentionally preserves form state (user is returning to their in-progress form)
`docker build .` passes (lint, format, build all green).
clawbot
removed their assignment 2026-02-28 21:18:31 +01:00
The rework correctly fixes the validation state persistence bug reported by sneak:
resetSendValidation() clears error/warning text and disables the review button
Called from all three navigation paths to the send view (home, addressDetail, addressToken)
Returning to the send view now starts with a clean slate
docker build . passes (lint, build all green). Assigned to @sneak for merge.
**Review (rework): ✅ Approved — merge-ready**
The rework correctly fixes the validation state persistence bug reported by sneak:
- `resetSendValidation()` clears error/warning text and disables the review button
- Called from all three navigation paths to the send view (home, addressDetail, addressToken)
- Returning to the send view now starts with a clean slate
`docker build .` passes (lint, build all green). Assigned to @sneak for merge.
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.
Adds validation on the To address field in the send view before allowing the user to proceed to review.
Changes
Closes #67
8379ab4685to2f11c43dd8Rebased onto main to resolve merge conflict in
src/popup/views/send.js(theTOKEN_BY_ADDRESS→resolveSymbolrename). Resolution keepsresolveSymbolimport from main and adds theethersimport + validation code from this branch.docker build .passes (lint, format, build all green).Review: ✅ Approved — merge-ready
Code review passed. The validation implementation is thorough:
getAddressdocker build .passes (lint, format, build all green). Assigning to @sneak for merge.after leaving the
sendview, the warning/error field is not reset, so returning tosendeven when the destination field is empty, an error or warning remains.7cfb3404cfto9de7791553Rework complete. Fixed the validation state persistence bug.
Changes
resetSendValidation()tosend.js— clears the error/warning text and disables the review buttonresetSendValidation()when navigating to the send view from home, address detail, and address token viewsdocker build .passes (lint, format, build all green).Review (rework): ✅ Approved — merge-ready
The rework correctly fixes the validation state persistence bug reported by sneak:
resetSendValidation()clears error/warning text and disables the review buttondocker build .passes (lint, build all green). Assigned to @sneak for merge.