diff --git a/src/services/lnd/liquidityProvider.ts b/src/services/lnd/liquidityProvider.ts index cb703f33..f11ddfe9 100644 --- a/src/services/lnd/liquidityProvider.ts +++ b/src/services/lnd/liquidityProvider.ts @@ -24,7 +24,7 @@ export class LiquidityProvider { invoicePaidCb: InvoicePaidCb connecting = false readyInterval: NodeJS.Timeout - queue: { res: (usable: boolean) => void }[] = [] + queue: ((usable: boolean) => void)[] = [] // make the sub process accept client constructor(pubDestination: string, invoicePaidCb: InvoicePaidCb) { if (!pubDestination) { @@ -55,7 +55,7 @@ export class LiquidityProvider { return true } return new Promise(res => { - this.queue.push({ res }) + this.queue.push(res) }) } @@ -70,7 +70,7 @@ export class LiquidityProvider { if (this.latestMaxWithdrawable === null) { return } - this.queue.forEach(q => q.res(true)) + this.queue.forEach(q => q(true)) this.log("subbing to user operations") this.client.GetLiveUserOperations(res => { console.log("got user operation", res)