btcpayserver/BTCPayServer/Events/NewOnChainTransactionEvent.cs
2024-10-07 09:37:56 +09:00

18 lines
550 B
C#

using BTCPayServer.Payments;
using NBXplorer.Models;
namespace BTCPayServer.Events
{
public class NewOnChainTransactionEvent
{
public NewTransactionEvent NewTransactionEvent { get; set; }
public PaymentMethodId PaymentMethodId { get; set; }
public override string ToString()
{
var state = NewTransactionEvent.BlockId == null ? "Unconfirmed" : "Confirmed";
return $"{PaymentMethodId}: New transaction {NewTransactionEvent.TransactionData.TransactionHash} ({state})";
}
}
}