LN-Zap / zap-iOS

Zap Wallet - Native iOS lightning wallet focused on user experience and ease of use ⚡️
http://zaphq.io
MIT License
181 stars 47 forks source link

LNURL request urls are not generated properly when the callback contains query string #349

Open tkthundr opened 3 years ago

tkthundr commented 3 years ago

Describe the problem/bug lnurl urls are not properly generated when the callback has a query string in it.

if request.callbackUrl=https://lnpay.co/v1/user/wallet/waka_5wtZllyHmwYqMJY5zA6kEP6/lnurl-process?ott=yolo

https://github.com/LN-Zap/zap-iOS/blob/d1d53fa8aa2690adbf3be7124e662568fc43b8d7/Lightning/LNURL/LNURL.swift#L122

generates https://lnpay.co/v1/user/wallet/waka_5wtZllyHmwYqMJY5zA6kEP6/lnurl-process?ott=yolo?k1=123&pr=lnbc....

To Reproduce Steps to reproduce the behavior: try this lnurl withdraw request

LNURL1DP68GURN8GHJ7MRWWPSHJTNRDUHHVVF0WASKCMR9WSHHWCTTV90N2AM5TFKXC72GD4M4JU2DFFVN27JPXE4525PK9AKXUATJDSKHQUN0VDJHXUELDA68G0T4DYKHWDFRGLW

Expected behavior The LNURL withdraw works properly

Actual behavior withdraw fails

Screenshots/Links

Additional context