From 113a3be9c90e80dd5a862cff06ab3ec0ab220235 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Sat, 13 Jul 2024 20:28:07 +0200 Subject: [PATCH] up --- src/services/main/liquidityManager.ts | 6 +----- src/services/main/liquidityProvider.ts | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services/main/liquidityManager.ts b/src/services/main/liquidityManager.ts index 86216f2f..0067ee41 100644 --- a/src/services/main/liquidityManager.ts +++ b/src/services/main/liquidityManager.ts @@ -153,22 +153,18 @@ export class LiquidityManager { shouldOpenChannel = async (): Promise<{ shouldOpen: false } | { shouldOpen: true, maxSpendable: number }> => { const threshold = this.settings.lspSettings.channelThreshold if (threshold === 0) { - this.log("channel threshold is 0") return { shouldOpen: false } } const { remote } = await this.lnd.ChannelBalance() if (remote > threshold) { - this.log("remote channel balance is already more than threshold") return { shouldOpen: false } } const pendingChannels = await this.lnd.ListPendingChannels() if (pendingChannels.pendingOpenChannels.length > 0) { - this.log("pending open channels detected, liquidiity might be on the way") return { shouldOpen: false } } const maxW = await this.liquidityProvider.GetLatestMaxWithdrawable() if (maxW < threshold) { - this.log("max withdrawable of", maxW, "is lower than channel threshold of", threshold) return { shouldOpen: false } } return { shouldOpen: true, maxSpendable: maxW } @@ -188,7 +184,7 @@ export class LiquidityManager { return } this.channelRequesting = true - this.log("checking if channel should be requested") + this.log("requesting channel from lsp") const olympusOk = await this.olympusLSP.requestChannel(shouldOpen.maxSpendable) if (olympusOk) { this.log("requested channel from olympus") diff --git a/src/services/main/liquidityProvider.ts b/src/services/main/liquidityProvider.ts index 38962821..f89efc55 100644 --- a/src/services/main/liquidityProvider.ts +++ b/src/services/main/liquidityProvider.ts @@ -88,7 +88,6 @@ export class LiquidityProvider { this.queue.forEach(q => q('ready')) this.log("subbing to user operations") this.client.GetLiveUserOperations(res => { - console.log("got user operation", res) if (res.status === 'ERROR') { this.log("error getting user operations", res.reason) return