fix: only the user switches the wallet's network (closes #408)
A connected site's wallet_switchEthereumChain request for the other supported network now opens a prompt in its own window, through the existing approval machinery, naming the site and both networks. The network, endpoints, balances and caches change, and chainChanged is sent, only when the user approves it; rejecting or closing the prompt answers 4001. One such prompt per site at a time; a request for the active network needs none. The approval window no longer shows the connection prompt while it waits for the approval's description, since both prompts answer on the same port. Model: opus-5-5
This commit is contained in:
@@ -44,6 +44,20 @@ then continue tagging as milestones land.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-07: A site can no longer switch the wallet's network by itself
|
||||
([#408](https://git.eeqj.de/sneak/AutistMask/issues/408)). A connected site's
|
||||
`wallet_switchEthereumChain` request for the other supported network opens a
|
||||
prompt in its own window, through the same approval machinery as the
|
||||
transaction and signature prompts, naming the site, the current network and
|
||||
the requested one. The network, its endpoints, the balances and the caches
|
||||
change, and `chainChanged` is sent, only when the user approves it; rejecting
|
||||
or closing the prompt answers 4001. One such prompt per site at a time. The
|
||||
approval window no longer shows the connection prompt while it waits for the
|
||||
background to describe the approval, because that prompt's "Allow" answers on
|
||||
the same port as the new one; `tests/approvalWindow.test.js` checks that it
|
||||
shows no screen until then. `tests/chainSwitchGate.test.js` and both browser
|
||||
suites drive the prompt.
|
||||
|
||||
- 2026-10-07: Two contradictions between the documents and the code are resolved
|
||||
as ruled on [#165](https://git.eeqj.de/sneak/AutistMask/issues/165). The
|
||||
README's 1.0 non-goal now puts Ethereum mainnet and the Sepolia testnet in
|
||||
|
||||
Reference in New Issue
Block a user