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

auto redirection after Solana Wallet Integration - to https://solanamobile.com/wallets #936

Closed
LFerronato opened this issue Mar 26, 2024 · 1 comment

Comments

@LFerronato
Copy link

Guys, needing help, this is the first time I'm using the Solana integration and some strange things are happening;

Describe the bug
Some of our users have reported that when they attempt to access our dApp, they are being redirected to https://solanamobile.com/wallets. This behavior is unexpected and has not been coded into our dApp by our team.
(video -
https://github.com/anza-xyz/wallet-adapter/assets/43012047/54ae16cf-320a-44a7-9782-73db23e18ff2)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://gray.market
  2. just wait (video)

Expected behavior
I believe that is very intrusive and affect the dApp's sense of security, a redirect like this.
It's not the kind of thing that a lib should generate as a side effect.
So, the expected behavior It would be if this didn't exist by default

Smartphone (please complete the following information):
I'm not sure which devices, there are reports from several users that this is happening.

Additional context
I wrote this note: #604 (comment)
I have openned a issue here before: solana-labs/solana-web3.js#2378

Dependencies:

    "@solana/spl-token": "^0.4.0",
    "@solana/wallet-adapter-react": "^0.15.35",
    "@solana/wallet-adapter-react-ui": "^0.9.34",
    "@solana/wallet-adapter-wallets": "^0.19.25",
    "@solana/web3.js": "^1.89.1",
    "bs58": "^5.0.0",
    "next": "14.0.4",
@steveluscher
Copy link
Collaborator

When on mobile, your code must not attempt to autoconnect to the wallet. If you do, this is what happens:

  1. You try to autoconnect
  2. The mobile wallet adapter tries to make a connection
  3. Because the connection did not originate from a user gesture (eg. a tap on the screen) the browser's popup blocker blocks it.
  4. Mobile wallet adapter presumes that there is no installed wallet, and redirects to the wallets landing.

Again: do not autoconnect or call connect() programmatically on mobile.

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

No branches or pull requests

2 participants