chore: cleanup

This commit is contained in:
2023-11-01 00:40:12 +09:00
parent 8f90daa840
commit c65bb7a992
56 changed files with 344 additions and 221 deletions

View File

@ -1,3 +1,4 @@
import { throwIfOffline } from "@snort/shared";
import {
InvoiceRequest,
LNWallet,
@ -120,6 +121,7 @@ export default class LNDHubWallet implements LNWallet {
}
private async getJson<T>(method: "GET" | "POST", path: string, body?: unknown): Promise<T> {
throwIfOffline();
const auth = `Bearer ${this.auth?.access_token}`;
const url = `${this.url.pathname === "/" ? this.url.toString().slice(0, -1) : this.url.toString()}${path}`;
const rsp = await fetch(url, {