MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.08k stars 1.08k forks source link

Slight inconvenience with the WalletConnect sendTransaction process. #9697

Open judeProground opened 2 months ago

judeProground commented 2 months ago

What is this about?

Hello. I'm using MetaMask through the WalletConnect connector and wagmi on mobile. There is a slight inconvenience with the sendTransaction process.

When requesting a signature from MetaMask using the wagmi sendTransaction action, if the requested chain differs from the current chain in MetaMask, a network switch flow is triggered.

During this process, when the user confirms the network switch in the MetaMask app, it redirects back to the dapp. However, at the same time, the signature prompt is displayed in the MetaMask app, requiring the dapp user to manually switch back from dapp to the MetaMask app. This causes unnecessary redirection. Therefore, for the sendTransaction request through WalletConnect, I suggest that there should be no redirection after switching the network.

Thanks.

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

References

No response

christopherferreira9 commented 2 months ago

Hi @judeProground ! Can you please provide the MetaMask Mobile wallet you're experiencing this bahaviour?

judeProground commented 1 month ago

Thank you for your response @christopherferreira9. I'm using MetaMask mobile v7.21.0 and the issue is reproducible using the Uniswap mobile web application.

After connecting with WalletConnect on Uniswap (the connection process itself was not smooth, but let's move on), the issue occurs during the sendTransaction process.

https://github.com/MetaMask/metamask-mobile/assets/122759638/acc1a4d2-d52f-402b-92ab-3789a64d770d

~ 8s: Changes to a different network(Klaytn) on the MetaMask app than the one intended(BSC) for signing. ~ 18s: Request sign on Uniswap and open MetaMask app. ~ 23s: Change the network to BSC in the switch network bottom sheet. ~ 24s: The MetaMask app automatically redirects to the dApp (problem explained above, A dApp user who is not familiar with this situation will not understand why they were redirected back to the dApp and will have no choice but to wait there.). ~ 31s: Wait a little and manually return to the MetaMask app. ~ 36s: The signing window appears in the MetaMask app.

This occurs on iOS versions below 17 and on Android.