Fix missing method in lnurlp error (#2139)

This commit is contained in:
ekzyis 2025-04-26 21:04:39 +02:00 committed by GitHub
parent 97317d4c0c
commit 236f930a17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,11 +39,12 @@ export async function lnAddrOptions (addr, { signal } = {}) {
const unexpectedErrorMessage = 'Lightning address validation failed. Make sure you entered the correct address.' const unexpectedErrorMessage = 'Lightning address validation failed. Make sure you entered the correct address.'
let body let body
const method = 'GET'
const url = `${protocol}://${domain}/.well-known/lnurlp/${name}` const url = `${protocol}://${domain}/.well-known/lnurlp/${name}`
try { try {
const res = await fetch(url, { signal }) const res = await fetch(url, { method, signal })
assertResponseOk(res) assertResponseOk(res, { method })
assertContentTypeJson(res) assertContentTypeJson(res, { method })
body = await res.json() body = await res.json()
} catch (err) { } catch (err) {
console.log('Error fetching lnurlp:', err) console.log('Error fetching lnurlp:', err)