From c6249764f083431b98f290559fd1746212161bab Mon Sep 17 00:00:00 2001 From: boufni95 Date: Tue, 16 Sep 2025 19:50:32 +0000 Subject: [PATCH] fix --- src/services/lnd/lnd.ts | 3 ++- src/services/main/liquidityProvider.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/lnd/lnd.ts b/src/services/lnd/lnd.ts index 6c5112de..d1b65b50 100644 --- a/src/services/lnd/lnd.ts +++ b/src/services/lnd/lnd.ts @@ -290,7 +290,8 @@ export default class { async NewInvoice(value: number, memo: string, expiry: number, { useProvider, from }: TxActionOptions): Promise { if (useProvider) { - const invoice = await this.liquidProvider.AddInvoice(value, memo, from) + console.log("using provider") + const invoice = await this.liquidProvider.AddInvoice(value, memo, from, expiry) const providerDst = this.liquidProvider.GetProviderDestination() return { payRequest: invoice, providerDst } } diff --git a/src/services/main/liquidityProvider.ts b/src/services/main/liquidityProvider.ts index 01d60b94..725aa61e 100644 --- a/src/services/main/liquidityProvider.ts +++ b/src/services/main/liquidityProvider.ts @@ -165,12 +165,12 @@ export class LiquidityProvider { return true } - AddInvoice = async (amount: number, memo: string, from: 'user' | 'system') => { + AddInvoice = async (amount: number, memo: string, from: 'user' | 'system', expiry: number) => { try { if (!this.ready) { throw new Error("liquidity provider is not ready yet") } - const res = await this.client.NewInvoice({ amountSats: amount, memo }) + const res = await this.client.NewInvoice({ amountSats: amount, memo, expiry }) if (res.status === 'ERROR') { this.log("error creating invoice", res.reason) throw new Error(res.reason)