diff --git a/BTCPayServer/Events/Notifications/NotificationEventBase.cs b/BTCPayServer/Events/Notifications/NotificationEventBase.cs index e9ffeeebd..7b60cc533 100644 --- a/BTCPayServer/Events/Notifications/NotificationEventBase.cs +++ b/BTCPayServer/Events/Notifications/NotificationEventBase.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using BTCPayServer.Data; using BTCPayServer.Models.NotificationViewModels; using ExchangeSharp; @@ -12,6 +8,8 @@ namespace BTCPayServer.Events.Notifications { public abstract class NotificationEventBase { + public virtual string NotificationType { get { return GetType().Name; } } + public NotificationData ToData() { var obj = JsonConvert.SerializeObject(this); @@ -19,7 +17,7 @@ namespace BTCPayServer.Events.Notifications var data = new NotificationData { Created = DateTimeOffset.UtcNow, - NotificationType = GetType().Name, + NotificationType = NotificationType, Blob = obj.ToBytesUTF8(), Seen = false };