@@ -474,7 +474,7 @@ where
474
474
amount_msat,
475
475
) ;
476
476
let payment_preimage = match purpose {
477
- PaymentPurpose :: InvoicePayment { payment_preimage, payment_secret } => {
477
+ PaymentPurpose :: Bolt11InvoicePayment { payment_preimage, payment_secret } => {
478
478
if payment_preimage. is_some ( ) {
479
479
payment_preimage
480
480
} else {
@@ -483,6 +483,26 @@ where
483
483
. ok ( )
484
484
}
485
485
} ,
486
+ PaymentPurpose :: Bolt12OfferPayment { .. } => {
487
+ // TODO: support BOLT12.
488
+ log_error ! (
489
+ self . logger,
490
+ "Failed to claim unsupported BOLT12 payment with hash: {}" ,
491
+ payment_hash
492
+ ) ;
493
+ self . channel_manager . fail_htlc_backwards ( & payment_hash) ;
494
+ return ;
495
+ } ,
496
+ PaymentPurpose :: Bolt12RefundPayment { .. } => {
497
+ // TODO: support BOLT12.
498
+ log_error ! (
499
+ self . logger,
500
+ "Failed to claim unsupported BOLT12 payment with hash: {}" ,
501
+ payment_hash
502
+ ) ;
503
+ self . channel_manager . fail_htlc_backwards ( & payment_hash) ;
504
+ return ;
505
+ } ,
486
506
PaymentPurpose :: SpontaneousPayment ( preimage) => Some ( preimage) ,
487
507
} ;
488
508
@@ -521,7 +541,11 @@ where
521
541
amount_msat,
522
542
) ;
523
543
match purpose {
524
- PaymentPurpose :: InvoicePayment { payment_preimage, payment_secret, .. } => {
544
+ PaymentPurpose :: Bolt11InvoicePayment {
545
+ payment_preimage,
546
+ payment_secret,
547
+ ..
548
+ } => {
525
549
let update = PaymentDetailsUpdate {
526
550
preimage : Some ( payment_preimage) ,
527
551
secret : Some ( Some ( payment_secret) ) ,
@@ -550,6 +574,24 @@ where
550
574
} ,
551
575
}
552
576
} ,
577
+ PaymentPurpose :: Bolt12OfferPayment { .. } => {
578
+ // TODO: support BOLT12.
579
+ log_error ! (
580
+ self . logger,
581
+ "Failed to claim unsupported BOLT12 payment with hash: {}" ,
582
+ payment_hash
583
+ ) ;
584
+ return ;
585
+ } ,
586
+ PaymentPurpose :: Bolt12RefundPayment { .. } => {
587
+ // TODO: support BOLT12.
588
+ log_error ! (
589
+ self . logger,
590
+ "Failed to claim unsupported BOLT12 payment with hash: {}" ,
591
+ payment_hash
592
+ ) ;
593
+ return ;
594
+ } ,
553
595
PaymentPurpose :: SpontaneousPayment ( preimage) => {
554
596
let payment = PaymentDetails {
555
597
preimage : Some ( preimage) ,
0 commit comments