Skip to content
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

[1.98] Impossible to change a network from Sepolia using selector #5371

Open
elena-zh opened this issue Feb 3, 2025 · 4 comments
Open

[1.98] Impossible to change a network from Sepolia using selector #5371

elena-zh opened this issue Feb 3, 2025 · 4 comments
Labels
Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system

Comments

@elena-zh
Copy link
Contributor

elena-zh commented Feb 3, 2025

Reported in https://cowservices.slack.com/archives/C0361CDG8GP/p1738585733181509

Connected to MM extension, each time when I try switching a network, I see 'base' indicator in the URL with no regard to a selected network, and the request to change a network is not sent to my wallet

https://www.loom.com/share/2a846facacb54b5b9185d9b82546539e

Expected: the network should be changed

@elena-zh elena-zh added Bug Something isn't working Medium Severity indicator. It causes some undesirable behavior, but the system is still functional labels Feb 3, 2025
@re2005
Copy link

re2005 commented Feb 3, 2025

Additionally when a selected network is not present on user's Metamask, it should suggest the user to add it.

Seems to be something around this file:
https://github.com/cowprotocol/cowswap/blob/develop/libs/wallet/src/web3-react/utils/switchChain.ts#L45

Trying to activate a chain that is not present in Metamask insteda of suggest it to add window.ethereum.request()

@elena-zh elena-zh changed the title Impossible to change a network using selector Impossible to change a network from Sepolia using selector Feb 4, 2025
@elena-zh
Copy link
Contributor Author

elena-zh commented Feb 4, 2025

Additionally when a selected network is not present on user's Metamask, it should suggest the user to add it.

Seems to be something around this file: https://github.com/cowprotocol/cowswap/blob/develop/libs/wallet/src/web3-react/utils/switchChain.ts#L45

Trying to activate a chain that is not present in Metamask insteda of suggest it to add window.ethereum.request()

Hi @re2005 , thank you for your suggestion.
It is already working this way on CoW Swap.

Image

@re2005
Copy link

re2005 commented Feb 4, 2025

Thanks for the reply @elena-zh

Look at this screen video:

Screen.Recording.2025-02-04.at.10.44.53.mov

Usually if I select a network that is not present on my Metamask I should be prompted to add this network, and this is not what is happening.

@elena-zh
Copy link
Contributor Author

elena-zh commented Feb 4, 2025

Thanks for the reply @elena-zh

Look at this screen video:

Screen.Recording.2025-02-04.at.10.44.53.mov
Usually if I select a network that is not present on my Metamask I should be prompted to add this network, and this is not what is happening.

@re2005 , thank you for clarification. Looks like the original issue is about this case you are describing. At least, on the video provided there you can see the same behavior.

@elena-zh elena-zh changed the title Impossible to change a network from Sepolia using selector [1.98] Impossible to change a network from Sepolia using selector Feb 5, 2025
@elena-zh elena-zh added Low Severity indicator for defects. It won't cause any major break-down of the system and removed Medium Severity indicator. It causes some undesirable behavior, but the system is still functional labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system
Projects
None yet
Development

No branches or pull requests

3 participants
@re2005 @elena-zh and others