Closed TimonPeng closed 2 years ago
This seems like an issue with Safari blocking popups (presumably for Sollet, or other wallets that use popups). It doesn't seem like an issue with WalletAdapter exactly. But if you still think it is, please open a new issue and fill out the bug report template.
Thinking about this more, the issue is probably this: https://github.com/solana-labs/wallet-adapter/blob/e15287221b90f8d7bee60726d251a5b4c76d243a/packages/wallets/sollet/src/base.ts#L105
The library Sollet uses is loaded dynamically now, which means there is a delay between the click event and the popup opening. Because of this delay, the browser sees the user clicking and the popup opening as unrelated events.
However, I don't think we should fix this. As a rule, we don't load external third party libraries for any of the adapters without the user attempting to connect to them, so there's no easy fix.
The only way around this would be to open a popup window immediately, then have Sollet update the URL for the open window instead of opening a new one.
Given that Sollet is deprecated and not well maintained, I don't see us implementing a workaround. Users can allow popups and it's mostly okay.
The paradigm Sollet uses of opening a browser window is subject to phishing attacks and we shouldn't do anything special to enable it.