From 31c1d4795f38fe573e798b3c9d244ef906d461f4 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 10 Feb 2025 15:29:38 +0900 Subject: [PATCH] If an On-Chain payment get replaced, log it in invoice logs rather than console --- BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs index a0c75b79e..c34b35588 100644 --- a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs +++ b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs @@ -291,7 +291,9 @@ namespace BTCPayServer.Payments.Bitcoin result.RPCCode == RPCErrorCode.RPC_TRANSACTION_REJECTED); if (!accounted && payment.Accounted && tx.Confirmations != -1) { - Logs.PayServer.LogInformation($"{wallet.Network.CryptoCode}: The transaction {tx.TransactionHash} has been replaced."); + var logs = new InvoiceLogs(); + logs.Write($"The transaction {tx.TransactionHash} has been replaced.", InvoiceEventData.EventSeverity.Warning); + await _InvoiceRepository.AddInvoiceLogs(invoice.Id, logs); } if (paymentData.PayjoinInformation is PayjoinInformation pj) {