@@ -541,34 +541,29 @@ pub struct WebhookNotification {
541541}
542542
543543impl WebhookNotification {
544- /// Create a new webhook notification.
545- pub fn new ( method : WebhookNotificationMethod ) -> Self {
546- Self { method }
547- }
548-
549544 /// Create a webhook_registered notification.
550545 pub fn webhook_registered ( ) -> Self {
551- Self :: new ( WebhookNotificationMethod :: LSPS5WebhookRegistered )
546+ Self { method : WebhookNotificationMethod :: LSPS5WebhookRegistered }
552547 }
553548
554549 /// Create a payment_incoming notification.
555550 pub fn payment_incoming ( ) -> Self {
556- Self :: new ( WebhookNotificationMethod :: LSPS5PaymentIncoming )
551+ Self { method : WebhookNotificationMethod :: LSPS5PaymentIncoming }
557552 }
558553
559554 /// Create an expiry_soon notification.
560555 pub fn expiry_soon ( timeout : u32 ) -> Self {
561- Self :: new ( WebhookNotificationMethod :: LSPS5ExpirySoon { timeout } )
556+ Self { method : WebhookNotificationMethod :: LSPS5ExpirySoon { timeout } }
562557 }
563558
564559 /// Create a liquidity_management_request notification.
565560 pub fn liquidity_management_request ( ) -> Self {
566- Self :: new ( WebhookNotificationMethod :: LSPS5LiquidityManagementRequest )
561+ Self { method : WebhookNotificationMethod :: LSPS5LiquidityManagementRequest }
567562 }
568563
569564 /// Create an onion_message_incoming notification.
570565 pub fn onion_message_incoming ( ) -> Self {
571- Self :: new ( WebhookNotificationMethod :: LSPS5OnionMessageIncoming )
566+ Self { method : WebhookNotificationMethod :: LSPS5OnionMessageIncoming }
572567 }
573568}
574569
0 commit comments