PROXY_METHODS no longer lists eth_chainId and net_version. handleRpc answers both itself, from the stored network, before it reaches its proxy branch, so the two entries were never used and the list named two methods that are never sent to the RPC endpoint. Nothing a page sees changes.
Shadowing check: of the 19 remaining entries, none is answered by an earlier branch of handleRpc (those handle eth_requestAccounts, eth_accounts, eth_chainId, net_version, the four wallet_* methods, personal_sign, eth_sign, the two eth_signTypedData* methods and eth_sendTransaction), and the message listener in front of it filters on no method.
tests/proxyMethods.test.js sends every listed method from a page, with fetch answering for the node, and fails naming any method whose answer did not come from the node. Putting eth_chainId back on the list makes it fail.
README.md needs no change: its External Services section lists the calls the wallet itself makes to the RPC endpoint, not this list, and names neither removed method as proxied.
Judgement call: src/background/index.js now ends with module.exports = { PROXY_METHODS }; so the test reads the real list rather than a copy. The bundler wraps the script in the same immediately-run module wrapper it gives every other module, so the worker still runs at load exactly as before.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/AutistMask/issues/326.
`PROXY_METHODS` no longer lists `eth_chainId` and `net_version`. `handleRpc` answers both itself, from the stored network, before it reaches its proxy branch, so the two entries were never used and the list named two methods that are never sent to the RPC endpoint. Nothing a page sees changes.
Shadowing check: of the 19 remaining entries, none is answered by an earlier branch of `handleRpc` (those handle `eth_requestAccounts`, `eth_accounts`, `eth_chainId`, `net_version`, the four `wallet_*` methods, `personal_sign`, `eth_sign`, the two `eth_signTypedData*` methods and `eth_sendTransaction`), and the message listener in front of it filters on no method.
`tests/proxyMethods.test.js` sends every listed method from a page, with `fetch` answering for the node, and fails naming any method whose answer did not come from the node. Putting `eth_chainId` back on the list makes it fail.
`README.md` needs no change: its External Services section lists the calls the wallet itself makes to the RPC endpoint, not this list, and names neither removed method as proxied.
Judgement call: `src/background/index.js` now ends with `module.exports = { PROXY_METHODS };` so the test reads the real list rather than a copy. The bundler wraps the script in the same immediately-run module wrapper it gives every other module, so the worker still runs at load exactly as before.
Model: opus-5-5
handleRpc answers both methods itself before it reaches its proxy branch, so
the two list entries were never used and the list named two methods that are
never sent to the RPC endpoint. No other entry is answered earlier.
PROXY_METHODS is now exported from the background script so that
tests/proxyMethods.test.js can send every listed method from a page and fail
on any that does not reach the RPC endpoint.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #326.
PROXY_METHODSno longer listseth_chainIdandnet_version.handleRpcanswers both itself, from the stored network, before it reaches its proxy branch, so the two entries were never used and the list named two methods that are never sent to the RPC endpoint. Nothing a page sees changes.Shadowing check: of the 19 remaining entries, none is answered by an earlier branch of
handleRpc(those handleeth_requestAccounts,eth_accounts,eth_chainId,net_version, the fourwallet_*methods,personal_sign,eth_sign, the twoeth_signTypedData*methods andeth_sendTransaction), and the message listener in front of it filters on no method.tests/proxyMethods.test.jssends every listed method from a page, withfetchanswering for the node, and fails naming any method whose answer did not come from the node. Puttingeth_chainIdback on the list makes it fail.README.mdneeds no change: its External Services section lists the calls the wallet itself makes to the RPC endpoint, not this list, and names neither removed method as proxied.Judgement call:
src/background/index.jsnow ends withmodule.exports = { PROXY_METHODS };so the test reads the real list rather than a copy. The bundler wraps the script in the same immediately-run module wrapper it gives every other module, so the worker still runs at load exactly as before.Model: opus-5-5
PASS
Model: opus-5-5