File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
lightning-liquidity/src/lsps5 Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ pub enum WebhookNotificationMethod {
461
461
}
462
462
463
463
/// Webhook notification payload.
464
- #[ derive( Clone , PartialEq , Eq ) ]
464
+ #[ derive( Debug , Clone , PartialEq , Eq ) ]
465
465
pub struct WebhookNotification {
466
466
/// Notification method with parameters.
467
467
pub method : WebhookNotificationMethod ,
@@ -499,13 +499,11 @@ impl WebhookNotification {
499
499
}
500
500
}
501
501
502
- impl fmt:: Debug for WebhookNotification {
502
+ impl fmt:: Display for WebhookNotification {
503
503
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
504
504
match serde_json:: to_string ( self ) {
505
505
Ok ( json) => f. write_str ( & json) ,
506
- // WebhookNotification is well defined and does not contain arbitrary data, so
507
- // this case should never happen.
508
- Err ( _) => f. write_str ( "<failed-to-serialize>" ) ,
506
+ Err ( _) => Err ( fmt:: Error ) ,
509
507
}
510
508
}
511
509
}
Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ where
435
435
436
436
fn sign_notification ( & self , body : & WebhookNotification , timestamp : & LSPSDateTime ) -> String {
437
437
let message = format ! (
438
- "LSPS5: DO NOT SIGN THIS MESSAGE MANUALLY: LSP: At {} I notify {:? }" ,
438
+ "LSPS5: DO NOT SIGN THIS MESSAGE MANUALLY: LSP: At {} I notify {}" ,
439
439
timestamp. to_rfc3339( ) ,
440
440
body
441
441
) ;
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ where
101
101
}
102
102
103
103
let message = format ! (
104
- "LSPS5: DO NOT SIGN THIS MESSAGE MANUALLY: LSP: At {} I notify {:? }" ,
104
+ "LSPS5: DO NOT SIGN THIS MESSAGE MANUALLY: LSP: At {} I notify {}" ,
105
105
signature_timestamp. to_rfc3339( ) ,
106
106
notification
107
107
) ;
You can’t perform that action at this time.
0 commit comments