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

refactor: coinbase connector popup improvements #2392

Merged
merged 28 commits into from
Jun 12, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Jun 11, 2024

Changes

onConnect trigger logic

When users select a connector, we are redirecting them to w3m-connecting-external-view and trigger the onConnect method in the first render and watch changes. While this is working fine 99%, there are some issues with the ones which opens a popup.

Coinbase's new SDK using popups and modern browsers disable popups if they are triggered programmatically rather than user action. If a user not trigger the popup, they are being disabled. This results to not have popup opened on some browsers/devices. I.e Safari/iOS.

iOS Safari app have Block pop-ups setting enabled by default under Settings > Safari > General. Most users don't aware of this and the ones who select Coinbase won't be realizing there should be popup opened.

Fix

To fix this, we need to trigger the connection once the users select the Coinbase app from the wallet list, and at the same time, redirect them to loading page (w3m-connecting-external-view) and watch changes.

This PR introduces changes to connector methods to handle this specific case for Coinbase.

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Jun 12, 2024 10:27am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Jun 12, 2024 10:27am

@enesozturk enesozturk force-pushed the refactor/coinbase-connector-popup-trigger-logic branch from 808c00d to 492ff66 Compare June 12, 2024 09:04
@svenvoskamp svenvoskamp merged commit 61f87fc into V4 Jun 12, 2024
9 checks passed
@svenvoskamp svenvoskamp deleted the refactor/coinbase-connector-popup-trigger-logic branch June 12, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants