Fix missing method in lnurlp error (#2139)
This commit is contained in:
parent
97317d4c0c
commit
236f930a17
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user