useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Update docs for provider changes

Open JCaraballo113 opened this issue 3 years ago • 1 comments

So it seems like the library property from useEthers was changed and now you get a typescript error that library.provider no longer exists. But I can confirm it's still there since I am using it to trigger network changes on user's metamask wallet. My question is what is the proper way of doing library.provider.request now

JCaraballo113 avatar Feb 16 '22 14:02 JCaraballo113

I found how you do this now but just by fiddling around and not the docs. This is how you would add a new ethereum chain to their metamask for example

await library.send('wallet_addEthereumChain', [
  params,
]);

JCaraballo113 avatar Feb 16 '22 15:02 JCaraballo113