-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
base: develop
Are you sure you want to change the base?
Conversation
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. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/queued-request-controller@2.0.0 |
@metamaskbot update-policies |
👍 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. |
@@ -185,6 +185,8 @@ export async function switchChain( | |||
} | |||
} | |||
|
|||
// await new Promise((resolve) => setTimeout(resolve, 1000)) |
There was a problem hiding this comment.
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
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
…-add-switch-chain' into jl/fix-queued-request-controller-add-switch-chain
Description
Bumps
@metamask/queued-request-controller
to fix queueing issue with Chain Permissionwallet_switchEthereumChain
andwallet_addEthereumChain
when switching to a previously permitted chainRelated issues
Related: MetaMask/core#4846
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2024-10-24.at.1.57.19.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist