@@ -497,11 +497,18 @@ type extractIntentTestCase struct {
497
497
func TestExtractIntentFromSendRequest (t * testing.T ) {
498
498
const paymentAmount = btcutil .Amount (300_000 )
499
499
500
- const paymentReq = "lnbcrt500u1pnh0xflpp56w08q26t896vg2e9mtdkrem320tp" +
501
- "wws9z9sfr7dw86dx97d90u4sdqqcqzzsxqyz5vqsp5z9945kvfy5g9afmakz" +
502
- "yrur2t4hhn2tr87un8j0r0e6l5m5zm0fus9qxpqysgqk98c6j7qefdpdmzt4" +
503
- "g6aykds4ydvf2x9lpngqcfux3hv8qlraan9v3s9296r5w5eh959yzadgh5ck" +
504
- "gjydgyfxdpumxtuk3p3caugmlqpz5necs"
500
+ const paymentReq = "lnbcrt500u1pnh0xflpp56w08q26t896vg2e9mtdkr" +
501
+ "em320tpwws9z9sfr7dw86dx97d90u4sdqqcqzzsxqyz5vqsp5z9945kvfy5g" +
502
+ "9afmakzyrur2t4hhn2tr87un8j0r0e6l5m5zm0fus9qxpqysgqk98c6j7qef" +
503
+ "dpdmzt4g6aykds4ydvf2x9lpngqcfux3hv8qlraan9v3s9296r5w5eh959yz" +
504
+ "adgh5ckgjydgyfxdpumxtuk3p3caugmlqpz5necs"
505
+
506
+ const paymentReqMissingAddr = "lnbcrt100p1p70xwfzpp5qqqsyqcyq5rqwzqfq" +
507
+ "qqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kge" +
508
+ "tjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaqnp4q0n326hr8v9zprg8" +
509
+ "gsvezcch06gfaqqhde2aj730yg0durunfhv669qypqqqz3uu8wnr7883qzxr" +
510
+ "566nuhled49fx6e6q0jn06w6gpgyznwzxwf8xdmye87kpx0y8lqtcgwywsau" +
511
+ "0jkm66evelkw7cggwlegp4anv3cq62wusm"
505
512
506
513
destNodeBytes , err := hex .DecodeString (destKey )
507
514
require .NoError (t , err )
@@ -714,6 +721,23 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
714
721
valid : false ,
715
722
expectedErrorMsg : "invoice expired." ,
716
723
},
724
+ {
725
+ name : "Invoice missing payment address" ,
726
+ backend : & RouterBackend {
727
+ ShouldSetExpEndorsement : func () bool {
728
+ return false
729
+ },
730
+ ActiveNetParams : & chaincfg .RegressionNetParams ,
731
+ MaxTotalTimelock : 1000 ,
732
+ },
733
+ sendReq : & SendPaymentRequest {
734
+ PaymentRequest : paymentReqMissingAddr ,
735
+ CltvLimit : 22 ,
736
+ },
737
+ valid : false ,
738
+ expectedErrorMsg : "payment request must contain " +
739
+ "either a payment address or blinded paths" ,
740
+ },
717
741
{
718
742
name : "Invalid dest vertex length" ,
719
743
backend : & RouterBackend {
0 commit comments