MetaMask / MetaMask/metamask-mobile
[Bug]: Unable to swap on uniswap using device browser - Request to switch networks to Ethereum Mainnet
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### Describe the bug
When the current network in MetaMask is not set to Ethereum Mainnet, it's not possible to swap on Uniswap using the device browser.
There is a request in MetaMask to switch to Ethereum Mainnet.
If it's rejected, the swap is not possible. If continue and the network is switched to Ethereum mainnet, the swap is not possible until switching back manually to the desired network
### Expected behavior
No request to switch to Ethereum Mainnet and be able to confirm the swap.
### Screenshots/Recordings
https://github.com/user-attachments/assets/5e5af438-41f0-4552-8b67-622e214e7874
### Steps to reproduce
1. Have current network in MetaMask set to any network except Ethereum Mainnet
2. Connect to Uniswap using device browser
3. Notice the network selected on Uniswap is the current one in MetaMask
4. Swap any token
5. Notice request in MetaMask to switch to Ethereum Mainnet
6. Unable to complete swap if rejecting
7. If accepting and network is switch to Ethereum Mainnet in MetaMask, unable to complete swap until the network is switched back manually to the desired one
### Error messages or log output
_No response_
### Detection stage
During release testing
### Version
7.36.0
### Build type
Other (please specify exactly where you obtained this build in "Additional Context" section)
### Device
Android 14 - Pixel 6 Pro
### Operating system
Android
### Additional context
I obtained the build from [here](https://app.bitrise.io/app/be69d4368ee7e86d/installable-artifacts/7e0c5081d3c5e128/public-install-page/2bc791b8c282341bfcc0ada2f3b55638)
### Severity
_No response_
Contributor guide
Research direction
Reproduce the swap flow on Android 14 with a Pixel 6 Pro using version 7.36.0, keeping MetaMask on a network other than Ethereum Mainnet. Trace the device-browser network selection and swap flow described in the steps; done means a swap can be confirmed without an unwanted network switch or requiring a manual switch back.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- blockchain, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100