If an On-Chain payment get replaced, log it in invoice logs rather than console

This commit is contained in:
nicolas.dorier
2025-02-10 15:29:38 +09:00
parent ddea59cb1b
commit 31c1d4795f

View File

@@ -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)
{