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

fix: Hide MMI Account Mistmatch BannerAlert from Sign-in with Ethereum (SIWE) Redesign Page #25662

Merged
merged 3 commits into from
Jul 9, 2024

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Jul 3, 2024

Description

Open in GitHub Codespaces

Related issues

Fixes: #25661

Manual testing steps

  1. Go to test-dapp
  2. Connect with an account
  3. Open MM and change the account
  4. Test SIWE and observe no MMI account mismatch banner. Bad Account should still display account mismatch row alerts

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@digiwand digiwand requested a review from a team as a code owner July 3, 2024 16:38
Copy link
Contributor

github-actions bot commented Jul 3, 2024

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.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Jul 3, 2024
@digiwand digiwand linked an issue Jul 3, 2024 that may be closed by this pull request
9 tasks
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.80%. Comparing base (5ee57a6) to head (e81f316).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25662      +/-   ##
===========================================
+ Coverage    69.77%   69.80%   +0.02%     
===========================================
  Files         1376     1377       +1     
  Lines        48403    48437      +34     
  Branches     13348    13355       +7     
===========================================
+ Hits         33773    33807      +34     
  Misses       14630    14630              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [3689366]
Page Load Metrics (257 ± 235 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint693861298842
domContentLoaded1096352612
load451771257490235
domInteractive1096352612
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Base automatically changed from MMI-5202-account-mismatch-banner to develop July 4, 2024 09:28
@albertolive albertolive requested review from a team as code owners July 4, 2024 09:28
@digiwand digiwand force-pushed the fix-hide-siwe-MMI-account-banner branch from 3689366 to 8fa1cef Compare July 5, 2024 15:28
matthewwalsh0
matthewwalsh0 previously approved these changes Jul 5, 2024
},
});

expect(container.querySelector('.mm-banner-alert')).not.toBeInTheDocument();
Copy link
Member

Choose a reason for hiding this comment

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

Minor, but for consistency should we use the same selector as above in the positive test? Or change both to classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @matthewwalsh0! Thanks for the suggestion

using getByText and not retrieving a result would result in an error

TestingLibraryElementError: Unable to find an element with the text:

I do like the test above since it checks the content. I added the class check to the test above to display the inverse checks more explicitly

Copy link

sonarcloud bot commented Jul 9, 2024

@digiwand digiwand changed the title Hide MMI Account Mistmatch BannerAlert from Sign-in with Ethereum (SIWE) Redesign Page fix: Hide MMI Account Mistmatch BannerAlert from Sign-in with Ethereum (SIWE) Redesign Page Jul 9, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [e81f316]
Page Load Metrics (257 ± 258 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint713371205426
domContentLoaded10111332210
load442090257537258
domInteractive10111332210
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@digiwand digiwand merged commit 19b0e57 into develop Jul 9, 2024
74 of 75 checks passed
@digiwand digiwand deleted the fix-hide-siwe-MMI-account-banner branch July 9, 2024 13:29
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2024
@metamaskbot metamaskbot added the release-12.2.0 Issue or pull request that will be included in release 12.2.0 label Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Signature Redesign]: Disable MMI account mismatch for SIWE pages
6 participants