project-serum / sol-wallet-adapter

Other
185 stars 93 forks source link

When connecting, no event is emitted on failure #44

Open jordaaash opened 2 years ago

jordaaash commented 2 years ago

When using the web version, if the popup is blocked by the browser or closed by the user, the connect call will hang and never emit an event or reject its promise.

Similarly for the extension, if the user declines permission to connect or closes the extension popup, the connect call will never emit an event. It also resolves its promise immediately (https://github.com/project-serum/sol-wallet-adapter/issues/24).

Dapps can listen for a connect event but cannot reliably detect the connection failure and are left in an unknown state.