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