From 4b6216612f1c6728ba855dcf779ef79811c02ca4 Mon Sep 17 00:00:00 2001 From: shocknet-justin Date: Fri, 19 Dec 2025 02:28:35 -0500 Subject: [PATCH] clean --- src/services/main/liquidityProvider.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/services/main/liquidityProvider.ts b/src/services/main/liquidityProvider.ts index 16c49c09..c3017ef8 100644 --- a/src/services/main/liquidityProvider.ts +++ b/src/services/main/liquidityProvider.ts @@ -132,9 +132,6 @@ export class LiquidityProvider { } GetUserState = async () => { - if (!this.configured) { - throw new Error("liquidity provider not initialized") - } const res = await Promise.race([this.client.GetUserInfo(), new Promise(res => setTimeout(() => res({ status: 'ERROR', reason: 'timeout' }), 10 * 1000))]) if (res.status === 'ERROR') { if (res.reason !== 'timeout') { @@ -214,9 +211,6 @@ export class LiquidityProvider { if (!this.IsReady()) { throw new Error("liquidity provider is not ready yet, disabled or unreachable") } - if (!this.configured) { - throw new Error("liquidity provider not initialized") - } const res = await this.client.NewInvoice({ amountSats: amount, memo, expiry }) if (res.status === 'ERROR') { this.log("error creating invoice", res.reason) @@ -236,9 +230,6 @@ export class LiquidityProvider { if (!this.IsReady()) { throw new Error("liquidity provider is not ready yet, disabled or unreachable") } - if (!this.configured) { - throw new Error("liquidity provider not initialized") - } const fees = this.GetFees() const providerServiceFee = this.GetServiceFee(decodedAmount, fees) if (feeLimit && providerServiceFee > feeLimit) { @@ -278,9 +269,6 @@ export class LiquidityProvider { if (!this.IsReady()) { throw new Error("liquidity provider is not ready yet, disabled or unreachable") } - if (!this.configured || !this.utils.nostrSender.IsReady()) { - throw new Error("liquidity provider not initialized") - } const res = await this.client.GetPaymentState({ invoice }) if (res.status === 'ERROR') { this.log("error getting payment state", res.reason) @@ -293,9 +281,6 @@ export class LiquidityProvider { if (!this.IsReady()) { throw new Error("liquidity provider is not ready yet, disabled or unreachable") } - if (!this.configured || !this.utils.nostrSender.IsReady()) { - throw new Error("liquidity provider not initialized") - } const res = await this.client.GetUserOperations({ latestIncomingInvoice: { ts: 0, id: 0 }, latestOutgoingInvoice: { ts: 0, id: 0 }, latestIncomingTx: { ts: 0, id: 0 }, latestOutgoingTx: { ts: 0, id: 0 }, latestIncomingUserToUserPayment: { ts: 0, id: 0 },