I'm attempting to work around an issue with the Coinbase Wallet Chrome extension where it's making incorrect network requests(specifically badly structured eth_chainId
request) when trying to add a custom network. I want to intercept these requests and modify them so they're correct.
I'm aware of tools like Requestly, which allow for the modification of network requests from web pages. However, I'm unsure if it's possible to use these tools to modify requests made by other Chrome extensions due to Chrome's security model.
Is there a way to use Requestly or a similar tool to modify network requests made by a Chrome extension? If not, are there any alternative methods or tools I could use to achieve this? I've tried but Requestly does not seem to intercept any of the extension's requests.
For more context, the request the Coinbase wallet extension makes:
curl https://testnet.hashio.io/api \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_chainId"}'
The request it should make(i.e. should have params
and id
fields in the request body):
curl https://testnet.hashio.io/api \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'