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: handle events before lnclient is initialized #236

Closed im-adithya closed 5 months ago

im-adithya commented 5 months ago

Title

bumi commented 5 months ago

can this happen?

rolznz commented 5 months ago

can this happen?

It could happen if your NWC is restarted and in a locked state, and a connected app tries to make payments. I think it might be good to return a specific error here so it's easier to debug when something goes wrong.

bumi commented 5 months ago

it could happen if your NWC is restarted and in a locked state, and a connected app tries to make payments. I think it might be good to return a specific error here so it's easier to debug when something goes wrong.

then the NWC app is also not listening for that messages and will not be able to reply.

and I am not sure if such internals should be publicly exposed. the app will likely not even handle that error well.

rolznz commented 5 months ago

@bumi yeah, you're right. It's impossible for this to work with the new setup. (the nostr key is also encrypted so we couldn't reply even if we started the server)

rolznz commented 5 months ago

@im-adithya I will close this for now - see above