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

Sign in with Ethereum: re-enable warning UI for mismatched domains / disable domain binding #18200

Merged
merged 8 commits into from
Mar 17, 2023

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Mar 16, 2023

Explanation

Fixes #17707

Hotfix targeting v10.26.2

Screenshots/Screencaps

Before

SIWE.mov

previous warning UI:
Screen Shot 2023-03-16 at 10 22 22 AM

After

Screen Shot 2023-03-16 at 10 22 29 AM

Screen Shot 2023-03-16 at 10 22 13 AM

Screen Shot 2023-03-16 at 10 38 04 AM

Manual Testing Steps

  1. Login to the extension
  2. Navigate to the test dapp
  3. Click Sign In With Ethereum (Bad Account)
  4. Observe warning flow

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

- unblocks mismatched domain support
- we may re-add error handling here #18184
- reverts logic from #16616
@digiwand digiwand requested a review from a team as a code owner March 16, 2023 17:18
@digiwand digiwand requested a review from NidhiKJha March 16, 2023 17:18
@github-actions
Copy link
Contributor

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.

@skgbafa
Copy link
Contributor

skgbafa commented Mar 16, 2023

The code change here looks solid. I think the shared components used in the warning was modified in other PRs, thus the odd views. @digiwand There is no other code to worry about from a functionality perspective

@metamaskbot
Copy link
Collaborator

Builds ready [d924916]
Page Load Metrics (1591 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96172117178
domContentLoaded13921802157010550
load14121849159111555
domInteractive13921802157010550
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -176 bytes
  • ui: 0 bytes
  • common: 0 bytes

@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #18200 (e11c2fc) into develop (c21c2bd) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop   #18200      +/-   ##
===========================================
- Coverage    63.96%   63.95%   -0.00%     
===========================================
  Files          914      914              
  Lines        35623    35616       -7     
  Branches      9030     9027       -3     
===========================================
- Hits         22784    22778       -6     
+ Misses       12839    12838       -1     
Impacted Files Coverage Δ
app/scripts/lib/personal-message-manager.js 75.12% <ø> (-0.36%) ⬇️
...p/signature-request-siwe/signature-request-siwe.js 2.17% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@digiwand
Copy link
Contributor Author

Thanks @skgbafa! for now, I've added code to fix the warning UI. We can follow-up with a proper fix and fine-tune the UI after

@digiwand digiwand added needs-qa Label will automate into QA workspace team-confirmations-secure-ux-PR PRs from the confirmations team labels Mar 16, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [bdbc997]
Page Load Metrics (1669 ± 135 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint963171294722
domContentLoaded132923341640251120
load132925561669281135
domInteractive132923341640251120
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -176 bytes
  • ui: -19 bytes
  • common: 0 bytes

@metamaskbot
Copy link
Collaborator

Builds ready [185213d]
Page Load Metrics (1563 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint982351202914
domContentLoaded1465183215528842
load1471183215638641
domInteractive1465183215528842
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -176 bytes
  • ui: -19 bytes
  • common: 0 bytes

jpuri
jpuri previously approved these changes Mar 16, 2023
This reverts commit c80a4a2.
@metamaskbot
Copy link
Collaborator

Builds ready [412a91a]
Page Load Metrics (1488 ± 30 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint91124103105
domContentLoaded1346153414665125
load1346159114886230
domInteractive1346153414665125
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -176 bytes
  • ui: -19 bytes
  • common: 0 bytes

Copy link
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -21,18 +21,25 @@
box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.08);
}

/** @todo replace ActionableMessage or remove overwritten code. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is addressed in this follow-up PR: #18207

@metamaskbot
Copy link
Collaborator

Builds ready [e11c2fc]
Page Load Metrics (1490 ± 35 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint901951132612
domContentLoaded1299163914827335
load1313163914907435
domInteractive1299163914827335
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -176 bytes
  • ui: -19 bytes
  • common: 0 bytes

@digiwand digiwand merged commit c4caef5 into develop Mar 17, 2023
@digiwand digiwand deleted the fix-siwe-unblock-mismatch-domain-with-warning-ui branch March 17, 2023 17:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
@naugtur
Copy link
Contributor

naugtur commented Apr 5, 2023

Follow-up to this
#18188 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signatures needs-qa Label will automate into QA workspace rc-cherry-picked team-confirmations-secure-ux-PR PRs from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Sign In with Ethereum throws an unhandled exception for bad domains
8 participants