lnbits / withdraw

LNbits Withdraw Extension
MIT License
5 stars 9 forks source link

[BUG] LNURLw not following lnurl withdraw specs #17

Open michaelWuensch opened 10 months ago

michaelWuensch commented 10 months ago

Describe the bug When you create a LNURLw voucher that has a higher amount than available in the wallet and you try to withdraw it, the response is malformed. Wallets cannot read the error message if it doesn't follow the spec.

The specs can be found here: https://github.com/lnurl/luds/blob/luds/03.md The relevant section is step 6.

To Reproduce Steps to reproduce the behavior:

  1. Create a wallet and fund it with 100 sats
  2. Enable LNURLw
  3. Create a voucher with 150 sats
  4. Try to withdraw it with a wallet

Expected behavior This response is expected: {"status": "ERROR", "reason": "Withdraw not working. Insufficient balance"}

But this response is delivered: {"detail":"withdraw not working. Insufficient balance."}

Desktop (please complete the following information):

Additional context Wallets cannot read this error message if it doesn't follow the spec.

dni commented 10 months ago

thank you very much! i am on it now

dni commented 10 months ago

hey i saw calle actually should have fixed it 2 weeks ago, in version v0.1.2 here: https://github.com/lnbits/withdraw/pull/10.

can you test that again? or did you run latest already?

michaelWuensch commented 10 months ago

@dni Awesome! I tried it on the demo server ( https://legend.lnbits.com ) I just checked it and it is still v0.1.1 there. As I am not an admin I cannot change it.