Basically, I just clone react-native project from the example repo.
When attempting to connect to the Polygon Amoy network using the Web3Modal library with @web3modal/ethers5-react-native, the connection fails on the first attempt. The connection only succeeds after terminating and reopening the application. This issue occurs consistently and has been verified under various network conditions and app states.
Steps to Reproduce
Initialize Web3Modal with @web3modal/ethers5-react-native configured for the Polygon Amoy or polygon network.
Attempt to connect to MetaMask on the first application launch.
Observe the failure to connect.
Terminate the app and reopen it.
Attempt to connect again and observe a successful connection.
Expected Behavior
The connection to MetaMask via Web3Modal should succeed on the first attempt without needing to restart the application after download/launch the new app
Actual Behavior
The connection fails on the first attempt and only succeeds after the application is restarted..
Link to minimal reproducible example
https://github.com/WalletConnect/react-native-examples/tree/main/dapps/W3MEthers5
Summary
Basically, I just clone react-native project from the example repo.
When attempting to connect to the Polygon Amoy network using the Web3Modal library with @web3modal/ethers5-react-native, the connection fails on the first attempt. The connection only succeeds after terminating and reopening the application. This issue occurs consistently and has been verified under various network conditions and app states.
Steps to Reproduce
Expected Behavior
The connection to MetaMask via Web3Modal should succeed on the first attempt without needing to restart the application after download/launch the new app
Actual Behavior
The connection fails on the first attempt and only succeeds after the application is restarted..
List of related npm package versions