boltcard / boltcard-wallet

The Bolt Card Compatible Wallet for Android and iOS
https://boltcardwallet.com/
MIT License
14 stars 1 forks source link

Prevent lndhub:// URLs from working #10

Closed robertclarkson closed 1 year ago

robertclarkson commented 1 year ago

If someone tries to connect an lndhub it currently allows it and then the app wallet is in a broken half working state.

Prevent lndhub:// URLs from working with handy error message directing them to the bolt hub docker github

chloehjung15 commented 1 year ago

Updated the isValidNodeAddress function in lightning-custodian-wallet. It's now calling /getinfobolt api call to the hub. If this returns with a right response we know this is a bolt hub. You will have to rebuild the hub on your server as I added a new api call on the hub.

https://github.com/boltcard/boltcard-wallet/blob/e1cc39c38953f52983de54ed751b1cf9d1d5e90b/class/wallets/lightning-custodian-wallet.js#L618