Skip to content

feat: use siwe detection from @metamask/controller-utils#18409

Merged
OGPoyraz merged 2 commits intodevelopfrom
feat/adopt-siwe-from-core
Apr 4, 2023
Merged

feat: use siwe detection from @metamask/controller-utils#18409
OGPoyraz merged 2 commits intodevelopfrom
feat/adopt-siwe-from-core

Conversation

@OGPoyraz
Copy link
Copy Markdown
Member

@OGPoyraz OGPoyraz commented Apr 3, 2023

Explanation

This PR aims to remove detectSIWE method from the extension code and consume that method from @metamask/controller-utils
It also removes usage of detectSIWE function from SignController, because it's already been implemented in PersonalMessageManager to extend message with siwe parameters. (See related PR here)

Related issue:
https://github.com/MetaMask/MetaMask-planning/issues/407

Manual Testing Steps

  • Go test dapp
  • Try "SIGN IN WITH ETHEREUM" button
  • Approve approval window
  • See result being printed below buttons

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.

@OGPoyraz OGPoyraz force-pushed the feat/adopt-siwe-from-core branch 3 times, most recently from 122b61c to fe5a61f Compare April 3, 2023 09:39
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [fe5a61f]
Page Load Metrics (1502 ± 53 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint92138105105
domContentLoaded13781750148810249
load13781750150210953
domInteractive13781750148810249
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -54886 bytes
  • ui: 1021 bytes
  • common: 30619 bytes

@OGPoyraz OGPoyraz marked this pull request as ready for review April 3, 2023 10:03
@OGPoyraz OGPoyraz requested a review from a team as a code owner April 3, 2023 10:03
@OGPoyraz OGPoyraz requested a review from segun April 3, 2023 10:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 3, 2023

Codecov Report

Merging #18409 (4fb8b1f) into develop (2029fb2) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #18409      +/-   ##
===========================================
+ Coverage    65.02%   65.07%   +0.05%     
===========================================
  Files          934      934              
  Lines        35967    35919      -48     
  Branches      9235     9225      -10     
===========================================
- Hits         23387    23373      -14     
+ Misses       12580    12546      -34     
Impacted Files Coverage Δ
app/scripts/controllers/sign.ts 92.55% <ø> (-0.22%) ⬇️
shared/modules/siwe.js 88.00% <ø> (+39.39%) ⬆️
...p/scripts/lib/createRPCMethodTrackingMiddleware.js 80.95% <100.00%> (+0.75%) ⬆️

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

brad-decker
brad-decker previously approved these changes Apr 3, 2023
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [4fb8b1f]
Page Load Metrics (1837 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1052991464120
domContentLoaded15992065181913565
load15992201183716177
domInteractive15992065181913565
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -54886 bytes
  • ui: 1021 bytes
  • common: 30619 bytes

@OGPoyraz OGPoyraz merged commit 6e40a0e into develop Apr 4, 2023
@OGPoyraz OGPoyraz deleted the feat/adopt-siwe-from-core branch April 4, 2023 15:26
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 4, 2023
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.

4 participants