MetaMask / snaps

Extend the functionality of MetaMask using Snaps
https://metamask.io/snaps/
Other
720 stars 553 forks source link

Explore relaxing timeouts when snaps are waiting for response from the extension #444

Closed FrederikBolding closed 2 years ago

FrederikBolding commented 2 years ago

We should look into ways of "pausing" or otherwise relaxing the execution timeout of a snap when the snap is waiting for a response from the extension. This will also prevent the problem of having snaps time out while they are waiting for the user to accept or reject a confirmation

rekmarks commented 2 years ago

A simple solution to this could be specifying a set of methods that suspends the ~execution~ request processing timeout until they return. If we do so, it should parameterized to the SnapController.

I'm curious to hear both what @FrederikBolding and @ritave think of such a solution given your work on timeouts and execution.

ritave commented 2 years ago

@rekmarks Was thinking of something even simpler. Just pause the timer until any Metamask wallet.request returns control back to Snap, no need for a whitelist.

FrederikBolding commented 2 years ago

@rekmarks Was thinking of something even simpler. Just pause the timer until any Metamask wallet.request returns control back to Snap, no need for a whitelist.

Yeah, I agree. See the Slack thread for more context!

rekmarks commented 2 years ago

Alright, we can go with that. I'll create a new issue for the implementation.