btcpayserver/BTCPayServer/Events/NewOnChainTransactionEvent.cs
2020-03-11 21:11:07 +09:00

17 lines
502 B
C#

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