From 3d007fa52b35eeafa114e8cdc51c2b861d77adf4 Mon Sep 17 00:00:00 2001 From: "Abdel @ StarkWare" Date: Fri, 20 Dec 2024 17:16:28 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20add=20logs=20in=20pay=20invoice?= =?UTF-8?q?=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin-bitcoin-lightning-network/src/actions/pay.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/plugin-bitcoin-lightning-network/src/actions/pay.ts b/packages/plugin-bitcoin-lightning-network/src/actions/pay.ts index fb6466ee89..65620cb671 100644 --- a/packages/plugin-bitcoin-lightning-network/src/actions/pay.ts +++ b/packages/plugin-bitcoin-lightning-network/src/actions/pay.ts @@ -17,11 +17,14 @@ export class PayInvoiceAction { constructor(private lnbitsProvider: LNBitsProvider) {} async payInvoice(invoice: string): Promise<{ status: string }> { - console.log(`Paying invoice: ${invoice}`); + console.log(`Received bolt11 invoice: ${invoice}`); + const decodedInvoice = + this.lnbitsProvider.toHumanFriendlyInvoice(invoice); + console.log(`Decoded invoice: ${JSON.stringify(decodedInvoice)}`); try { await this.lnbitsProvider.payInvoice(invoice); - + console.log("Invoice paid successfully"); return { status: "success", };