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.'
 | 
			
		||||
  let body
 | 
			
		||||
  const method = 'GET'
 | 
			
		||||
  const url = `${protocol}://${domain}/.well-known/lnurlp/${name}`
 | 
			
		||||
  try {
 | 
			
		||||
    const res = await fetch(url, { signal })
 | 
			
		||||
    assertResponseOk(res)
 | 
			
		||||
    assertContentTypeJson(res)
 | 
			
		||||
    const res = await fetch(url, { method, signal })
 | 
			
		||||
    assertResponseOk(res, { method })
 | 
			
		||||
    assertContentTypeJson(res, { method })
 | 
			
		||||
    body = await res.json()
 | 
			
		||||
  } catch (err) {
 | 
			
		||||
    console.log('Error fetching lnurlp:', err)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user