getAlby / bitcoin-connect

Connecting lightning wallets to your webapp has never been easier. Enable WebLN in all browsers with a single button
https://bitcoin-connect.com
MIT License
88 stars 30 forks source link

Change Bitcoin Connect to only boot when `init` function is called #210

Open rolznz opened 6 months ago

rolznz commented 6 months ago

Currently it boots automatically and tries to connect to the previously-connected wallet, which has some side effects (Causes the Alby extension unlock dialog to popup for example), which creates a poor experience for users who previously connected but have restarted their browser/computer since they last connected.

https://github.com/getAlby/bitcoin-connect/blob/master/src/state/boot.ts#L31

By moving this to be called by the init function, the app could boot when Bitcoin Connect is actually needed.