lndk-org / lndk

MIT License
83 stars 21 forks source link

Bug: second payment to CLN offer fails #116

Closed orbitalturtle closed 1 month ago

orbitalturtle commented 3 months ago

Describe the bug

When trying to pay a CLN offer twice, CLN sends us the same invoice for the second payment, causing LND to error. The solution is likely that we're using the same key to sign each invoice request, but we should use a new one each time: https://github.com/lndk-org/lndk/blob/6132601554da816cc1f73e07b90ed11e9b790510/src/lndk_offers.rs#L177

Thanks to @jkczyz for figuring out what was going on here!

orbitalturtle commented 3 months ago

I have a local branch working that fixes this. I just need to push it up.