diff --git a/src/services/main/index.ts b/src/services/main/index.ts index 0aaf5c4e..a4691246 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -119,6 +119,7 @@ export default class { const balanceEvents = await this.paymentManager.GetLndBalance() await this.metricsManager.NewBlockCb(height, balanceEvents) confirmed = await this.paymentManager.CheckNewlyConfirmedTxs(height) + log("checked newly confirmed transactions", confirmed) await this.liquidityManager.onNewBlock() } catch (err: any) { log(ERROR, "failed to check transactions after new block", err.message || err) diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index 2a1c1c34..b769adef 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -211,9 +211,11 @@ export default class { } const existingAddress = await this.storage.paymentStorage.GetExistingUserAddress(ctx.user_id, app) if (existingAddress) { + this.log("returning existing address", existingAddress.address) return { address: existingAddress.address } } const res = await this.lnd.NewAddress(req.addressType, { useProvider: false, from: 'user' }) + this.log("generated new address", res.address) const userAddress = await this.storage.paymentStorage.AddUserAddress(user, res.address, { linkedApplication: app }) this.storage.eventsLog.LogEvent({ type: 'new_address', userId: user.user_id, appUserId: "", appId: app.app_id, balance: user.balance_sats, data: res.address, amount: 0 }) return { address: userAddress.address }