Calling await ethereum.send('eth_chainId') — part of MetaMask's New API, see here — on the console of a regular website resolves nicely (left window), while calling it in a Drizzle project fails (right window). Used the same browser and the same MM account.
It seems this issue is originated by the interaction of web3.js with MM's new API. It can be replicated with this test repo by @cds-amal. When the script tags which import web3.js are uncommented, the same inpage.js:1 MetaMask - RPC Error: The method undefined does not exist/is not available error appears.
Calling
await ethereum.send('eth_chainId')
— part of MetaMask's New API, see here — on the console of a regular website resolves nicely (left window), while calling it in a Drizzle project fails (right window). Used the same browser and the same MM account.It seems this issue is originated by the interaction of
web3.js
with MM's new API. It can be replicated with this test repo by @cds-amal. When the script tags which importweb3.js
are uncommented, the sameinpage.js:1 MetaMask - RPC Error: The method undefined does not exist/is not available
error appears.