-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
fixes #25918 fixes #25889 Signed-off-by: Mircea Nistor <[email protected]>
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 <[email protected]>
Quality Gate passedIssues Measures |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This leaves the input field editable after an ENS resolved address has been picked
@@ -47,7 +47,7 @@ describe('AddContact component', () => { | |||
fireEvent.change(input, { target: { value: 'invalid address' } }); | |||
setTimeout(() => { | |||
expect(getByText('Recipient address is invalid')).toBeInTheDocument(); | |||
}, 100); | |||
}, 600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the debounce timeout is 500ms
Builds ready [92d190c]
Page Load Metrics (154 ± 179 ms)
Bundle size diffs
|
@@ -68,8 +68,10 @@ export default class AddContact extends PureComponent { | |||
isValidHexAddress(input, { mixedCaseUseChecksum: true }); | |||
const validEnsAddress = isValidDomainName(input); | |||
|
|||
if (!IS_FLASK && !validEnsAddress && !valid) { | |||
if (!validEnsAddress && !valid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not need it for FLASK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.js
where the disabled state of theSave
button 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