Can we inject WalletConnect's EthereumProvider to React Native Webview? #4127
Unanswered
williamliangwl
asked this question in
general-support
Replies: 1 comment
-
+1
i have this simple injector but its not working for things like event emitters and stuff like i get errors on window.ethereum.emit cuz clearly its not injected and undefined |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our app has been using
@walletconnect/web3wallet
to connect our users' wallet to the dapp. Our flow currently is very similar with the React Native example hereWe are now exploring to have in-app-browser that users can open any dapp and then they can connect to the dapp.
I saw many examples are suggesting to use the
@metamask/mobile-provider
and inject it intoreact-native-webview
. I believe the idea of@metamask/mobile-provider
is to inject a EIP1193 Provider intowindow.ethereum
object in the dapp. The result, when I try it, some dapp only showsMetamask
as the only option of connecting the wallet and there are callbacks / RPCs happening.However, we are wondering if we can change the option shown to user, from
Metamask
toWalletConnect
instead, so that we just reuse our current flow, rather than having to handle the RPCs from 0. We saw there's@walletconnect/ethereum-provider
. So we are wondering if we can inject that provider into thereact-native-webview
as well ? or actually it is very different with the Metamask's one?sorry for the noob question, I am still new to this field 🙏
Beta Was this translation helpful? Give feedback.
All reactions