Skip to content
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

Never disable network form save button if props chain ID is invalid #9808

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Nov 5, 2020

We received reports of users trying to update the chain ID for custom networks but the save button being disabled. This could happen if they had correctly stored the chain ID in decimal prior to version 8.1 of the extension.

In that case, we'd flag the network as invalid, and prompt the user to change it. However, if they re-entered the same decimal value, the form would disable the save button, since it compared the entered chain ID value against persisted chain ID value.

This PR avoids this problem by never flagging the form state as "unchanged" if the persisted chain ID is invalid.

@rekmarks rekmarks requested a review from a team as a code owner November 5, 2020 20:08
@rekmarks rekmarks changed the title Never disable save button if props chain ID is invalid Never disable network form save button if props chain ID is invalid Nov 5, 2020
@Gudahtt
Copy link
Member

Gudahtt commented Nov 5, 2020

This needs to be rebased to fix the linter (I introduced a lint error that was then fixed in #9806)

@rekmarks rekmarks force-pushed the network-form-fix-save-button-disable branch from 78ee9d3 to 929a140 Compare November 5, 2020 21:04
@metamaskbot
Copy link
Collaborator

Builds ready [929a140]
Page Load Metrics (392 ± 62 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30543653
domContentLoaded25671939112962
load25772039212962
domInteractive25571839112962

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rekmarks rekmarks merged commit efd36ad into develop Nov 5, 2020
@rekmarks rekmarks deleted the network-form-fix-save-button-disable branch November 5, 2020 22:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants