btcpayserver/BTCPayServer/Events/NewOnChainTransactionEvent.cs

18 lines
550 B
C#
Raw Normal View History

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