From 070aa758d899437bab008632039e77c3c095781a Mon Sep 17 00:00:00 2001 From: boufni95 Date: Wed, 4 Feb 2026 19:42:53 +0000 Subject: [PATCH] swap logs --- src/services/lnd/swaps/submarineSwaps.ts | 1 + src/services/lnd/swaps/swaps.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/services/lnd/swaps/submarineSwaps.ts b/src/services/lnd/swaps/submarineSwaps.ts index 760ca57e..788e3ce9 100644 --- a/src/services/lnd/swaps/submarineSwaps.ts +++ b/src/services/lnd/swaps/submarineSwaps.ts @@ -369,6 +369,7 @@ export class SubmarineSwaps { } SubscribeToInvoiceSwap = (data: InvoiceSwapData, swapDone: (result: { ok: true } | { ok: false, error: string }) => void, waitingTx: () => void) => { + this.log("subscribing to invoice swap", { id: data.createdResponse.id }) const webSocket = new ws(`${this.wsUrl}/v2/ws`) const subReq = { op: 'subscribe', channel: 'swap.update', args: [data.createdResponse.id] } webSocket.on('open', () => { diff --git a/src/services/lnd/swaps/swaps.ts b/src/services/lnd/swaps/swaps.ts index ba9b7f5b..fbb1613a 100644 --- a/src/services/lnd/swaps/swaps.ts +++ b/src/services/lnd/swaps/swaps.ts @@ -101,6 +101,7 @@ export class Swaps { } RefundInvoiceSwap = async (swapOperationId: string, satPerVByte: number, refundAddress: string, currentHeight: number): Promise<{ published: false, txHex: string, txId: string } | { published: true, txId: string }> => { + this.log("refunding invoice swap", { swapOperationId, satPerVByte, refundAddress, currentHeight }) const swap = await this.storage.paymentStorage.GetRefundableInvoiceSwap(swapOperationId) if (!swap) { throw new Error("Swap not found or already used") @@ -131,6 +132,7 @@ export class Swaps { } PayInvoiceSwap = async (appUserId: string, swapOpId: string, satPerVByte: number, payAddress: (address: string, amt: number) => Promise<{ txId: string }>): Promise => { + this.log("paying invoice swap", { appUserId, swapOpId, satPerVByte }) if (!this.settings.getSettings().swapsSettings.enableSwaps) { throw new Error("Swaps are not enabled") }