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: Bump QueuedRequestController (Fix queuing being broken due to wallet_switchEthereumChain and wallet_addEthereumChain) #28090

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Oct 24, 2024

Description

Bumps @metamask/queued-request-controller to fix queueing issue with Chain Permission wallet_switchEthereumChain and wallet_addEthereumChain when switching to a previously permitted chain

Open in GitHub Codespaces

Related issues

Related: MetaMask/core#4846

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Screen.Recording.2024-10-24.at.1.57.19.PM.mov

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.

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 Oct 24, 2024

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

Package New capabilities Transitives Size Publisher
npm/@metamask-previews/queued-request-controller@5.1.0-preview-49199726 None 0 150 kB mcmire, metamaskbot
npm/@metamask/controller-utils@11.4.0 network 0 263 kB metamaskbot

🚮 Removed packages: npm/@metamask/queued-request-controller@2.0.0

View full report↗︎

@jiexi
Copy link
Contributor Author

jiexi commented Oct 24, 2024

@metamaskbot update-policies

Copy link

socket-security bot commented Oct 24, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@@ -185,6 +185,8 @@ export async function switchChain(
}
}

// await new Promise((resolve) => setTimeout(resolve, 1000))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: remove this. Leaving it here to highlight what the hacky alternative is to dealing with making sure requests queued behind an add/switch chain make it into pending so that they are cleared by the setActiveNetwork that happens below this

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants