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

Fix for connector issue when opening as safe app #701

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

nenadV91
Copy link
Contributor

@nenadV91 nenadV91 commented Jun 17, 2022

Summary

Fixes #580

Fixes the connector issue when opening Cowswap as an Gnosis Safe app.

To reproduce the issue

1.- Ensure Metamask is disconnected from CowSwap
2.- Connect Metamask to the Safe (for Safe link use this https://gnosis-safe.io/app/share/safe-app?appUrl=https://pr701--cowswap.review.gnosisdev.com&chainId=1)
3.- Open CowSwap Safe App and will b e working as expected
4.- Move out of CowSwapSafe app
5.- Go to CowSwap web and connect Metamask.
6.- Reload CowSwap web
7.- Open again as Safe App and will be connected to Metamask instead of the Safe

In this PR, in the step 7 you should be connected with Gnosis Safe account and not MM account, that is the fix

@github-actions
Copy link
Contributor

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link
Contributor

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nenadV91 nenadV91 requested a review from a team June 17, 2022 12:20
@elena-zh
Copy link

Maybe not related to this PR, but I see that the Safe app takes data from local CowSwap app storage for affiliate flow. Is this OK?
image

@nenadV91
Copy link
Contributor Author

@elena-zh Since the Cowswap is loaded in Safe as an Iframe, apparently the localStorage data is also loaded from the Cowswap. I'm not really sure if this is the issue or not, but yea its not for this PR.

@cowprotocol cowprotocol deleted a comment Jun 18, 2022
@nenadV91 nenadV91 merged commit 6c817f2 into develop Jun 20, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2022
@alfetopito alfetopito deleted the 580/gnosis-safe-connector-issue branch June 20, 2022 10:00
@anxolin
Copy link
Contributor

anxolin commented Jun 20, 2022

In principle, we could display a finer message for the Gnosis Safe App case, but I think is ok.
The user can close the message. Actually, although is not very clear, they can sign the program by using another safe but in mainnet, so the message is kind of correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CowSwap keeps Metamask connection even when opening as Safe App
3 participants