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

[widget-standalone] impossible to change a network #4870

Open
elena-zh opened this issue Sep 9, 2024 · 1 comment · May be fixed by #5306
Open

[widget-standalone] impossible to change a network #4870

elena-zh opened this issue Sep 9, 2024 · 1 comment · May be fixed by #5306
Assignees
Labels
Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system Widget

Comments

@elena-zh
Copy link
Contributor

elena-zh commented Sep 9, 2024

  1. Open the widget configurator
  2. Connect to MM in in the standalone mode
  3. Using configuration panel, change a network in the widget

AR:

  1. the network is not changed: balances are still shown from a previous network.
  2. However, the configurator itself shows the newly selected network.
  3. The new network is not picked when disconnect-reconnect a wallet again
    chain
    image

ER: the network should be changed.

@elena-zh elena-zh added Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system Widget labels Sep 9, 2024
@shoom3301 shoom3301 self-assigned this Sep 16, 2024
@shoom3301
Copy link
Collaborator

I've investigated the case and found out that it's a Metamask's bug...

Key point - Metamask browser extension does not send events (e.g. chanChanged) to iframes.

How to check that:

  1. Try using Metamask mobile via WalletConnect change network in the wallet and it should be updated in the widget)
  2. Cheat the Metamask browser extension:
  • Open https://widget.cow.fi/
  • Switch to Standalone mode
  • Change network in Metamask to Mainnet
  • Connect Metamask
  • Open https://swap.cow.fi/ in another tab and connect Metamask there as well
  • Change network in Metamask to Gnosis chain
  • AR: network in Widget tab and CowSwap tab is Gnosis chain!

It happens because in the 5th step we make Metamask think that current active tab is swap.cow.fi and it starts sending events to the widget iframe (which is actually swap.cow.fi).
Unfortunately I don't see any ways how we can improve this on our side 😞
The only way is to report the problem to Metamask and wait.

@elena-zh elena-zh changed the title [widget, standalone] impossible to change a network [widget] impossible to change a network Oct 17, 2024
@elena-zh elena-zh added Medium Severity indicator. It causes some undesirable behavior, but the system is still functional and removed Low Severity indicator for defects. It won't cause any major break-down of the system labels Oct 17, 2024
@elena-zh elena-zh changed the title [widget] impossible to change a network [widget-dApp mode] impossible to change a network Oct 17, 2024
@elena-zh elena-zh changed the title [widget-dApp mode] impossible to change a network [widget-standalone] impossible to change a network Oct 18, 2024
@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 Oct 18, 2024
@elena-zh elena-zh linked a pull request Jan 19, 2025 that will close this issue
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 Widget
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants