Closed adonesky1 closed 1 week ago
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.
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 57 | 132 | 76 | 23 | 11 |
domContentLoaded | 8 | 57 | 14 | 13 | 6 | ||
load | 45 | 2486 | 537 | 962 | 462 | ||
domInteractive | 8 | 57 | 14 | 13 | 6 |
Description
Currently Snaps can call RPC requests that do not fully conform to certain expectation built into the
QueuedRequestController
.wallet_invokeSnap
andwallet_snap
may some times cause a confirmation and in some cases they may not. Currently our blanket assumption that a method either does or does not involve a confirmation is causing an issue:wallet_invokeSnap
can call (as does JSON-RPC Snap on the Test-Snaps Page) another JSON-RPC method upon which it relies for completion. In the queuing system the second request gets queued behind the first (which depends on it for its own execution) leading to a lock up.We should resolve this issue with a more elegant solution for how these chained RPC requests should be handled by queueing. But for now it's safe to simply circumvent queueing for these Snaps methods: In the cases where there is a confirmation resulting from a
wallet_invokeSnap
orwallet_snap
call these requests will simply not be separated from a batch with another origin, which is fine.Related issues
Fixes: See this Slack thread
Manual testing steps
Invoke Snap
on JSON-RPC SnapInvoke Snap
buttonScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist