1
0
mirror of https://github.com/nbd-wtf/satdress.git synced 2024-09-23 01:20:34 +00:00

fixes for go-lnurl type updates.

This commit is contained in:
fiatjaf 2023-10-20 17:23:38 -03:00
parent 389943a65f
commit 57a8fbb964
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -63,7 +63,7 @@ func handleLNURL(w http.ResponseWriter, r *http.Request) {
maxSendable = 1000000000 maxSendable = 1000000000
} }
json.NewEncoder(w).Encode(lnurl.LNURLPayResponse1{ json.NewEncoder(w).Encode(lnurl.LNURLPayParams{
LNURLResponse: lnurl.LNURLResponse{Status: "OK"}, LNURLResponse: lnurl.LNURLResponse{Status: "OK"},
Callback: fmt.Sprintf("https://%s/.well-known/lnurlp/%s", domain, username), Callback: fmt.Sprintf("https://%s/.well-known/lnurlp/%s", domain, username),
MinSendable: minSendable, MinSendable: minSendable,
@ -87,10 +87,10 @@ func handleLNURL(w http.ResponseWriter, r *http.Request) {
return return
} }
json.NewEncoder(w).Encode(lnurl.LNURLPayResponse2{ json.NewEncoder(w).Encode(lnurl.LNURLPayValues{
LNURLResponse: lnurl.LNURLResponse{Status: "OK"}, LNURLResponse: lnurl.LNURLResponse{Status: "OK"},
PR: bolt11, PR: bolt11,
Routes: make([][]lnurl.RouteInfo, 0), Routes: make([]interface{}, 0),
Disposable: lnurl.FALSE, Disposable: lnurl.FALSE,
SuccessAction: lnurl.Action("Payment received!", ""), SuccessAction: lnurl.Action("Payment received!", ""),
}) })