mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-13 19:16:52 +01:00
Update lnurl.ts
This commit is contained in:
parent
bbf746b011
commit
238ee798ab
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import CryptoJS from 'crypto-js';
|
|||
// @ts-ignore theres no types for secp256k1
|
||||
import secp256k1 from 'secp256k1';
|
||||
import { parse } from 'url'; // eslint-disable-line n/no-deprecated-api
|
||||
import { timeoutFetch } from '../util/fetch';
|
||||
|
||||
const ONION_REGEX = /^(http:\/\/[^/:@]+\.onion(?::\d{1,5})?)(\/.*)?$/; // regex for onion URL
|
||||
|
||||
|
@ -111,7 +112,7 @@ export default class Lnurl {
|
|||
}
|
||||
|
||||
async fetchGet(url: string): Promise<any> {
|
||||
const resp = await fetch(url, { method: 'GET' });
|
||||
const resp = await timeoutFetch(url, { method: 'GET' });
|
||||
if (resp.status >= 300) {
|
||||
throw new Error('Bad response from server');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue