Merge pull request #6595 from NicolasDorier/replacement-log

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:46:19 +09:00 committed by GitHub
commit b184067df7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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