React Native connect Metamask

I am doing simple demo app on react native to connect to Metamask wallet, and we want to use Moralis as provider for NFT application later on.
I have followed up Quick start guides, and all went well on react and web, but once I start app on Android simulator, it refuse to work.
I am using wagmi, as described in Quick guide, and find out that I need to use WalletConnectConnector for mobile.
After registration on WalletConnect an app, as Draft, I am still having issue showing WalletConnect popup.
I got TypeError: Cannot read property ‘prototype’ of undefined, that is not giving me any hints…
If I do same code on web - it show popup with wallet connect.
Do we have any guide to connect Metamask wallet in mobile, instead of web ? Or maybe you can advice if I am doing something wrong, and for example should not use wagmi, as in Quick guide… not sure how to proceed

Hey @vingfls,

Can you show me which tutorial or quick start guides are you following for this?

I checked:
https://docs.moralis.io/authentication-api/how-to-authenticate-users-with-metamask-using-react - not working on react native due to InjectedConnector
https://docs.moralis.io/authentication-api/how-to-sign-in-with-metamask - same as MetaMaskConnector is extend from InjectedConnector
It is hard for me to apply https://docs.moralis.io/authentication-api/how-to-sign-in-with-walletconnect for native, as next auth library is used here, not sure if I can just reuse logic. Although just changing Connector to WalletConnectConnector not working for me, and I got error described above.

Hey @vingfls,

Thanks for reaching out to us :grinning_face_with_smiling_eyes:

Yeah you will need to replace the next-auth library with something else for JWT in React Native

I’m not sure what are you referring to as InjectedConnector. I was not able to find it in any of the docs you attached to me.

Hmm, if you open first doc and do Ctrl+F InjectedConnector, you will find it.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.