0

I want to connect Metamask on the web-browser using ReactJS

provider from @metamask/detect-provider doesnt have request function.

How can I use request function ?

enter image description here

2 Answers 2

0

use web3-react library from npm it will allow you to connect with the metamask make sure you have metamask installed in your browser

1
  • I used it. It did not work on mobile.
    – Jerry
    Nov 6, 2022 at 10:15
0

you should write it inside an if statement

if(provider){
    provider.request({})
}
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.