fix: a site allowed without Remember stays connected when the background worker idles (closes #526)
A connection allowed without "Remember my choice for this site" was held in a module-level object in the background worker. Chrome stops the worker after about 30 seconds idle, so the connection ended at the first idle spell. Each such connection is now one item in the browser's session storage, which outlives the worker but not the browser, read and written through new wrappers in src/shared/browserApi.js. Settings now waits for the background to end a removed site's connections before listing the connected sites again. The Firefox manifest declares 115.0, the first version with session storage, as its minimum. Model: opus-5-5
This commit is contained in:
+2
-4
@@ -3861,10 +3861,8 @@ test("eth_requestAccounts approved returns the selected address (#183)", async (
|
||||
// all; this measures that the whole address is visible (#517).
|
||||
await assertAddressesFit(popup, "the connection prompt");
|
||||
|
||||
// Remembered, so the connection survives a background worker that MV3
|
||||
// terminates after 30 seconds idle. The in-memory connectedSites map
|
||||
// does not, and the sign and transaction tests below all require the
|
||||
// origin to still be authorized.
|
||||
// Remembered, because the sign and transaction tests below all
|
||||
// require the origin to still be authorized.
|
||||
await popup.check("#approve-remember");
|
||||
await clickAndClose(popup, "#btn-approve");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user