Don't use `ethereum.send`, use `ethereum.request`
Describe the bug If you use a new version of MetaMask, you'll see the following warning in the browser console:
MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.
To Reproduce Steps to reproduce the behavior:
- Install Firefox.
- Install MetaMask.
- Sign-in to MetaMask.
- Open Augur UI.
- Notice warning in console.
Expected behavior No warnings about using deprecated methods.
Desktop (please complete the following information):
- OS: Windows
- Browser: Firefox
- Version: 78.0.2
Additional context
I suspect that this is coming from whatever library you are using, and hopefully the fix is as simple as updating the library. I believe that ethers has been updated to use ethereum.sendAsync or ethereum.request, so hopefully just updating to latest will fix this issue.
@andrewdamelio please take a look at this