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

v12 cherrypick: Bump queued-request-controller to ^1.0.0 (#25310) #25451

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Jun 20, 2024

cherrypicks ba8d84e which bumps queued-request-controller to ^1.0.0 and fixes the eth_requestAccounts handling bug

Merge conflicts on the lavamoat policies

Fixes: #25407

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Bumps `@metamask/queued-request-controller` to `^1.0.0` in order to
handle the case where `eth_requestAccounts` requests that would not
cause a confirmation to be presented to the user (because they have
permitted some accounts for that dapp) would be stuck behind the request
queue when they could just be passed through.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25310?quickstart=1)

See: MetaMask/core#4423
Fixes: #25407

1. Open https://metamask.github.io/test-dapp/ and https://app.odos.xyz/,
connect to both
1. On the Test Dapp, send an EIP 1559 txn, but do not confirm/reject the
confirmation nor close the popup
1. Reload ODOS
1. ODOS should show that is connected to MetaMask in the top right of
the webpage
1. Open console on the ODOS page
1. run `await window.ethereum.request({method: 'eth_requestAccounts'})`,
it should return immediately with the permitted accounts

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

https://github.com/MetaMask/metamask-extension/assets/918701/b76607ef-b0a3-4943-b1d5-85f8cd766343

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.

---------

Co-authored-by: MetaMask Bot <[email protected]>
@jiexi jiexi marked this pull request as ready for review June 20, 2024 19:39
@jiexi jiexi requested review from a team as code owners June 20, 2024 19:39
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.

Copy link

socket-security bot commented Jun 20, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] Transitive: environment +15 2.73 MB

🚮 Removed packages: npm/@metamask/[email protected]

View full report↗︎

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jun 20, 2024
@jiexi
Copy link
Contributor Author

jiexi commented Jun 20, 2024

Replaces #25311

@Gudahtt
Copy link
Member

Gudahtt commented Jun 20, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

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!

Copy link
Contributor

@adonesky1 adonesky1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jiexi
Copy link
Contributor Author

jiexi commented Jun 20, 2024

odd that the lavamoat policy is still failing

jiexi added 2 commits June 20, 2024 14:10
…counts' of github.com:MetaMask/metamask-extension into jl/Version-v12.0.0-cherrypick-ba8d84e-fix-eth_requestAccounts
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.61%. Comparing base (1c7e132) to head (6865807).

Files Patch % Lines
app/scripts/metamask-controller.js 71.43% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           Version-v12.0.0   #25451      +/-   ##
===================================================
+ Coverage            65.58%   65.61%   +0.02%     
===================================================
  Files                 1361     1361              
  Lines                54300    54287      -13     
  Branches             14118    14117       -1     
===================================================
+ Hits                 35611    35616       +5     
+ Misses               18689    18671      -18     

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

@metamaskbot
Copy link
Collaborator

Builds ready [6865807]
Page Load Metrics (45 ± 2 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint69847742
domContentLoaded8121010
load41574542
domInteractive8121010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 69.74 KiB (2.02%)
  • ui: 6.46 KiB (0.10%)
  • common: 168.73 KiB (2.68%)

@jiexi jiexi merged commit 1eaeeb0 into Version-v12.0.0 Jun 20, 2024
73 checks passed
@jiexi jiexi deleted the jl/Version-v12.0.0-cherrypick-ba8d84e-fix-eth_requestAccounts branch June 20, 2024 23:22
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2024
@metamaskbot metamaskbot added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 21, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.0.0 on PR, as PR was cherry-picked in branch 12.0.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.0.0 Issue or pull request that will be included in release 12.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants