btcpayserver
btcpayserver copied to clipboard
[Bug]: The defaultDescription of refund LNURL (withdrawRequest) is not correct type
What is your BTCPay version?
v1.6.12.0
How did you deploy BTCPay Server?
LunaNode hosting, Docker inside
What happened?
When returning funds via Lightning, the defaultDescription field is incorrectly generated as null (should be string type - LUD-03 specs)
How did you encounter this bug?
- To pay Lightning invoice, for example through POS
- In Admin area click by "Notification" icon then "Details" link of any paid invoice
- Click "Issue Refund" green button then may be to choose "Off-Chain" method (we should use Lightning refund type)
- When we see a refund page - click by "QR-Code icon" then "Bech32" type button (the bug was seen by me in the SBW wallet)
- Scan by SBW wallet and get error "Expected String as JsString, but got null"
- To understand error we should decode LNURL, for example through Lightning Decoder and to click by "Callback URL"
- The Callback URL will have a JSON data like this:
{"callback":"https://DOMAIN.COM/BTC/UILNURL/withdraw/pp/PAGfvWxoEfTU4ky6CmqawN8JxN3","k1":"PAGfvWxoEfTU4ky6CmqawN8JxN3","tag":"withdrawRequest","defaultDescription":null,"minWithdrawable":1000,"maxWithdrawable":395000,"currentBalance ":395000,"balanceCheck":"https://DOMAIN.COM/BTC/UILNURL/withdraw/pp/PAGfvWxoEfTU4ky6CmqawN8JxN3"} - There is the
defaultDescriptionfield as null type but the LUD-03 requires the String type. Thenullvalue is not string type.
Relevant log output
{"callback":"https://DOMAIN.COM/BTC/UILNURL/withdraw/pp/PAGfvWxoEfTU4ky6CmqawN8JxN3","k1":"PAGfvWxoEfTU4ky6CmqawN8JxN3","tag":"withdrawRequest","defaultDescription":null,"minWithdrawable":1000,"maxWithdrawable":395000,"currentBalance ":395000,"balanceCheck":"https://DOMAIN.COM/BTC/UILNURL/withdraw/pp/PAGfvWxoEfTU4ky6CmqawN8JxN3"}
What browser do you use?
Firefox v106.*
Additional information
No response
Are you sure this is a bug report?
- [X] I confirm this is a bug report
@Kukks Can you check this one?