-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native sample app for WalletConnect v2 #1118
Comments
When will it come? Or is there a react-native wallet example for v1? |
I have used Provider object from walletconnect V1 to wrap around my App component in react-native. Do we also have a sample implementation |
any update on this??, does anyone have the working example of RN with walletConnect v2? Thanks |
@ikethirdweb thanks 🙏 But it looks like that all this example does is basically calling But what next? How can we use this client? In v1 in How can it be done now? Docs for web are based on I would like to migrate to v2 because of dropping v1 support but I really have no clue where to start |
I feel your pain, I went through the same. I got it semi-working by following the code in this sample code: https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2-with-ethers. Note that the only difference is that instead of opening the uri with the web3modal you need to use Linking.openUrl(uri) in React Native. The only wallet I got it working with was the Trust Wallet on Mainnet, anything else just failed. Good luck! |
@ikethirdweb thanks! I started to try building this on my own too and now I was digging in sources of v1 to find out how to generate If I make any reasonable progress, I will share it here ;) |
After read through threads about react native, I just had few conclusion, and need confirmation from the team.
|
Hey all, so there are two sides to react native: dapp and wallet side:
|
Any update on this? This will be very helpful, thanks! |
@crypblizz8 +1, would love an update here for v2 RN dapps! |
Hey there @AlexMasmej @rafaeluzzi, the example for the dApp side is up. Video Preview of the result: 219010138-0b1980c7-9204-404c-bc62-b614f49e05b4.movWill add more info to the README later today. |
I tried your example. However, when I do I also replaced the SignClient and indicated native AsyncStorage, but still got no luck. Can you point me to where I should look at for fixing this? |
Hi @nnabinh, could you share your code so I can help to reproduce? Thanks |
I converted dapps/v2Explorer to work in expo successfully from your react native standalone, but I'm running into some issues.
when calling signer.getAddress() it always throws Is there a way to integrate a QR scanner into the dapp side? I need to be able to scan desktop wallet QR codes from my mobile dapp to open a walletconnect connection. How can I configure this to use polygon? Do i just add it to the RPC map & chains for universalProvider.connect()? If so, afterwards how do I specify the wallet to transfer on polygon vs Ethereum when doing a send?
|
I don't work at WC but I know some of the answers here:
Not sure what's going on with your signer and about Polygon, as long as you have it as the active chain in your wallet it should work (notice that I've had great difficulty finding wallets that support chains other than Ethereum), otherwise you'll need to manually Question for you, did you get this working with Expo Go? If you could explain what were the steps you took to make it work wtih Expo I'd appreciate it. Thanks! |
Yeah I got it working with expo. Basically just copy all of the files from dappv2Explorer into your existing project then view the screen (in the example its in src/screens/App.tsx & change the ENV_PROJECT_ID. I dont know if you're supposed to change ENV_RELAY_URL. I have mine set like their example 'wss://relay.walletconnect.com'. If you're running into issues lmk. The relevant files are ExplorerItem, ExplorerModal, ExplorerModalHeader, ExplorerUtils, InitialExplorerContent, UniversalProvider, useInitialization, ViewAllBox, ViewAllExplorerContent, App I still dont understand what rn_expo_wallet / the wallet side of this project is? What is its purpose can you explain a little more? Is it the wallet that you would be connecting to your Walletconnected wallet to transfer funds in? |
Right, that's the wallet example implementation they have. The code in there is what MetaMask, Rainbow or any other wallet needs to do to support wallet connect |
@crypblizz8 thanks a lot for the example integration. |
just saw this @desfero, please feel free to open a discussion if you have further questions 🙏 |
i am able to scan the qr code, but not sure how to make the connection of Desktop webapp Qrcode to the wallet in react-native, it gives me the above logs is ther a good example or step by step instructions for it PS::i am new to web3 |
No description provided.
The text was updated successfully, but these errors were encountered: