Closed rkalis closed 2 years ago
So the service worker goes inactive after 5 minutes of inactivity. We start a new connection to the service worker at every ethereum request that we intercept, for which we store some state in the ephemeral service worker. So as long as the user clicks reject/continue on the popup within 5 minutes, we shouldn't see any adverse effects of the non-persistent background script. I think it's fine to assume that users will do that within 5 minutes, so we can close this issue and re-open if it becomes an issue in the future.
In Manifest v2 it was possible to have a persistent background script. With Manifest v3 that's not possible any more, so we'll have to resort to dirty hacks.
https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension