@@ -218,8 +218,7 @@ async fn handle_ldk_events(
218
218
} => {
219
219
println ! (
220
220
"\n EVENT: received payment from payment hash {} of {} millisatoshis" ,
221
- hex_utils:: hex_str( & payment_hash. 0 ) ,
222
- amount_msat,
221
+ payment_hash, amount_msat,
223
222
) ;
224
223
print ! ( "> " ) ;
225
224
io:: stdout ( ) . flush ( ) . unwrap ( ) ;
@@ -239,8 +238,7 @@ async fn handle_ldk_events(
239
238
} => {
240
239
println ! (
241
240
"\n EVENT: claimed payment from payment hash {} of {} millisatoshis" ,
242
- hex_utils:: hex_str( & payment_hash. 0 ) ,
243
- amount_msat,
241
+ payment_hash, amount_msat,
244
242
) ;
245
243
print ! ( "> " ) ;
246
244
io:: stdout ( ) . flush ( ) . unwrap ( ) ;
@@ -277,15 +275,15 @@ async fn handle_ldk_events(
277
275
payment. status = HTLCStatus :: Succeeded ;
278
276
println ! (
279
277
"\n EVENT: successfully sent payment of {} millisatoshis{} from \
280
- payment hash {:? } with preimage {:? }",
278
+ payment hash {} with preimage {}",
281
279
payment. amt_msat,
282
280
if let Some ( fee) = fee_paid_msat {
283
281
format!( " (fee {} msat)" , fee)
284
282
} else {
285
283
"" . to_string( )
286
284
} ,
287
- hex_utils :: hex_str ( & payment_hash. 0 ) ,
288
- hex_utils :: hex_str ( & payment_preimage. 0 )
285
+ payment_hash,
286
+ payment_preimage
289
287
) ;
290
288
print ! ( "> " ) ;
291
289
io:: stdout ( ) . flush ( ) . unwrap ( ) ;
@@ -328,8 +326,8 @@ async fn handle_ldk_events(
328
326
Event :: ProbeFailed { .. } => { }
329
327
Event :: PaymentFailed { payment_hash, reason, .. } => {
330
328
print ! (
331
- "\n EVENT: Failed to send payment to payment hash {:? }: {:?}" ,
332
- hex_utils :: hex_str ( & payment_hash. 0 ) ,
329
+ "\n EVENT: Failed to send payment to payment hash {}: {:?}" ,
330
+ payment_hash,
333
331
if let Some ( r) = reason { r } else { PaymentFailureReason :: RetriesExhausted }
334
332
) ;
335
333
print ! ( "> " ) ;
0 commit comments