fix: enable Save button on Add Contact page for address input#26155
fix: enable Save button on Add Contact page for address input#26155
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Signed-off-by: Mircea Nistor <mirceanis@gmail.com>
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26155 +/- ##
===========================================
+ Coverage 69.70% 69.94% +0.24%
===========================================
Files 1409 1409
Lines 49788 49797 +9
Branches 13768 13771 +3
===========================================
+ Hits 34702 34828 +126
+ Misses 15086 14969 -117 ☔ View full report in Codecov by Sentry. |
| selectedAddress: resolvedAddress, | ||
| input: resolvedAddress, |
There was a problem hiding this comment.
This leaves the input field editable after an ENS resolved address has been picked
| setTimeout(() => { | ||
| expect(getByText('Recipient address is invalid')).toBeInTheDocument(); | ||
| }, 100); | ||
| }, 600); |
There was a problem hiding this comment.
the debounce timeout is 500ms
Builds ready [92d190c]
Page Load Metrics (154 ± 179 ms)
Bundle size diffs
|
| const validEnsAddress = isValidDomainName(input); | ||
|
|
||
| if (!IS_FLASK && !validEnsAddress && !valid) { | ||
| if (!validEnsAddress && !valid) { |
There was a problem hiding this comment.
it doesn't matter if we are in FLASK or not, the validation is the same



Description
This patches an issue in
add-contact.component.jswhere the disabled state of theSavebutton would disappear only after a successful ENS resolution, effectively preventing plain addresses to be entered.I also added some extra unit tests to check for some of the cases that weren't covered before.
Related issues
fixes #25918
fixes #25889
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist