fix: switching the network in Settings tells open pages (closes #500)
Once Settings has saved the new network it asks the background to send chainChanged with the new chain id to every open tab, through the same function an approved site switch request uses. Only the extension's own pages can ask for that. Choosing the network already active changes nothing and sends nothing. Model: opus-5-5
This commit was merged in pull request #503.
This commit is contained in:
@@ -422,11 +422,12 @@ captured at `eth_sendRawTransaction` rather than against anything the extension
|
||||
reported, rejecting each prompt is required to return a rejection to the page
|
||||
rather than hang or resolve, a network switch request is required to leave the
|
||||
stored network unchanged and send no `chainChanged` until it is approved, a
|
||||
prompt raised while another approval window has focus is required to open a
|
||||
window of its own, and the password is required to be absent from every message
|
||||
the approval window sends to the background — with the message that would carry
|
||||
it required to be present, so that check cannot pass by observing nothing. That
|
||||
last one is the standing floor under
|
||||
network switch in Settings is required to send the page `chainChanged` with the
|
||||
new chain id, a prompt raised while another approval window has focus is
|
||||
required to open a window of its own, and the password is required to be absent
|
||||
from every message the approval window sends to the background — with the
|
||||
message that would carry it required to be present, so that check cannot pass by
|
||||
observing nothing. That last one is the standing floor under
|
||||
[#157](https://git.eeqj.de/sneak/AutistMask/issues/157).
|
||||
|
||||
The limits of that coverage and of the rest of the Chrome suite, none of them
|
||||
@@ -1789,7 +1790,8 @@ view would leave a wallet one click from deletion.
|
||||
network changes only here, or when the user approves a site's request on
|
||||
**NetworkApproval**; either way, switching restores the RPC and Blockscout
|
||||
endpoints last used on that network, or that network's defaults if it has
|
||||
none
|
||||
none, and sends `chainChanged` with the new chain id to every open tab.
|
||||
Choosing the network already active changes nothing and sends nothing
|
||||
- Ethereum RPC: endpoint URL input + "Save" button (validated against
|
||||
`eth_chainId` before being saved)
|
||||
- Blockscout API: endpoint URL input + "Save" button (validated against
|
||||
|
||||
Reference in New Issue
Block a user