getAlby / nostr-wallet-connect

Nostr Wallet Connect (NIP-47) application to allow apps to connect to your node
https://nwc.getalby.com
Apache License 2.0
101 stars 29 forks source link

chore: validate node config in middleware #229

Closed im-adithya closed 5 months ago

im-adithya commented 6 months ago

Helps stop frontend from making requests before the setup process is complete.

rolznz commented 6 months ago

hmm, sorry I wasn't clear on this one:

handle requests made before LNClient starts up - should return an error code if svc.lnClient is nil

I meant NIP-47 requests (because all of those will blow up if there is no lnClient)

I'm not sure if we need this and it looks hard to maintain since we have to check all config options for every backend type. Could we just improve the frontend redirect works?

But some of those checks might be good when initially setting up the node (but for the LND one you only need to specify either the hex or file options)

rolznz commented 5 months ago

I cannot test this and am not sure if this is really needed. The frontend will not allow you to get in this state any more with the improved redirects from the onboarding branch that was merged. @im-adithya what do you think?

rolznz commented 5 months ago

Closing for now. If you think we should re-open this please open a new PR at https://github.com/getAlby/nostr-wallet-connect-next