@@ -870,7 +870,7 @@ mod tests {
870870 let payment_paths = payment_paths ( ) ;
871871 let payment_hash = payment_hash ( ) ;
872872 let now = now ( ) ;
873- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
873+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
874874 . amount_msats ( 1000 )
875875 . build ( ) . unwrap ( )
876876 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1052,7 +1052,7 @@ mod tests {
10521052 let now = now ( ) ;
10531053 let one_hour = Duration :: from_secs ( 3600 ) ;
10541054
1055- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1055+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
10561056 . amount_msats ( 1000 )
10571057 . build ( ) . unwrap ( )
10581058 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1068,7 +1068,7 @@ mod tests {
10681068 assert_eq ! ( invoice. relative_expiry( ) , one_hour) ;
10691069 assert_eq ! ( tlv_stream. relative_expiry, Some ( one_hour. as_secs( ) as u32 ) ) ;
10701070
1071- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1071+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
10721072 . amount_msats ( 1000 )
10731073 . build ( ) . unwrap ( )
10741074 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1087,7 +1087,7 @@ mod tests {
10871087
10881088 #[ test]
10891089 fn builds_invoice_with_amount_from_request ( ) {
1090- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1090+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
10911091 . amount_msats ( 1000 )
10921092 . build ( ) . unwrap ( )
10931093 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1109,7 +1109,7 @@ mod tests {
11091109 let x_only_pubkey = XOnlyPublicKey :: from_keypair ( & recipient_keys ( ) ) . 0 ;
11101110 let tweaked_pubkey = TweakedPublicKey :: dangerous_assume_tweaked ( x_only_pubkey) ;
11111111
1112- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1112+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
11131113 . amount_msats ( 1000 )
11141114 . build ( ) . unwrap ( )
11151115 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1154,7 +1154,7 @@ mod tests {
11541154 let mut features = Bolt12InvoiceFeatures :: empty ( ) ;
11551155 features. set_basic_mpp_optional ( ) ;
11561156
1157- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1157+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
11581158 . amount_msats ( 1000 )
11591159 . build ( ) . unwrap ( )
11601160 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1171,7 +1171,7 @@ mod tests {
11711171
11721172 #[ test]
11731173 fn fails_signing_invoice ( ) {
1174- match OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1174+ match OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
11751175 . amount_msats ( 1000 )
11761176 . build ( ) . unwrap ( )
11771177 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1185,7 +1185,7 @@ mod tests {
11851185 Err ( e) => assert_eq ! ( e, SignError :: Signing ( ( ) ) ) ,
11861186 }
11871187
1188- match OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1188+ match OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
11891189 . amount_msats ( 1000 )
11901190 . build ( ) . unwrap ( )
11911191 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1202,7 +1202,7 @@ mod tests {
12021202
12031203 #[ test]
12041204 fn parses_invoice_with_payment_paths ( ) {
1205- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1205+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
12061206 . amount_msats ( 1000 )
12071207 . build ( ) . unwrap ( )
12081208 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1257,7 +1257,7 @@ mod tests {
12571257
12581258 #[ test]
12591259 fn parses_invoice_with_created_at ( ) {
1260- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1260+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
12611261 . amount_msats ( 1000 )
12621262 . build ( ) . unwrap ( )
12631263 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1287,7 +1287,7 @@ mod tests {
12871287
12881288 #[ test]
12891289 fn parses_invoice_with_relative_expiry ( ) {
1290- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1290+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
12911291 . amount_msats ( 1000 )
12921292 . build ( ) . unwrap ( )
12931293 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1309,7 +1309,7 @@ mod tests {
13091309
13101310 #[ test]
13111311 fn parses_invoice_with_payment_hash ( ) {
1312- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1312+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
13131313 . amount_msats ( 1000 )
13141314 . build ( ) . unwrap ( )
13151315 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1339,7 +1339,7 @@ mod tests {
13391339
13401340 #[ test]
13411341 fn parses_invoice_with_amount ( ) {
1342- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1342+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
13431343 . amount_msats ( 1000 )
13441344 . build ( ) . unwrap ( )
13451345 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1367,7 +1367,7 @@ mod tests {
13671367
13681368 #[ test]
13691369 fn parses_invoice_with_allow_mpp ( ) {
1370- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1370+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
13711371 . amount_msats ( 1000 )
13721372 . build ( ) . unwrap ( )
13731373 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1398,7 +1398,7 @@ mod tests {
13981398 let x_only_pubkey = XOnlyPublicKey :: from_keypair ( & recipient_keys ( ) ) . 0 ;
13991399 let tweaked_pubkey = TweakedPublicKey :: dangerous_assume_tweaked ( x_only_pubkey) ;
14001400
1401- let offer = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1401+ let offer = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
14021402 . amount_msats ( 1000 )
14031403 . build ( ) . unwrap ( ) ;
14041404 let invoice_request = offer
@@ -1457,7 +1457,7 @@ mod tests {
14571457
14581458 #[ test]
14591459 fn parses_invoice_with_node_id ( ) {
1460- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1460+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
14611461 . amount_msats ( 1000 )
14621462 . build ( ) . unwrap ( )
14631463 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1499,7 +1499,7 @@ mod tests {
14991499 #[ test]
15001500 fn fails_parsing_invoice_without_signature ( ) {
15011501 let mut buffer = Vec :: new ( ) ;
1502- OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1502+ OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
15031503 . amount_msats ( 1000 )
15041504 . build ( ) . unwrap ( )
15051505 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1518,7 +1518,7 @@ mod tests {
15181518
15191519 #[ test]
15201520 fn fails_parsing_invoice_with_invalid_signature ( ) {
1521- let mut invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1521+ let mut invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
15221522 . amount_msats ( 1000 )
15231523 . build ( ) . unwrap ( )
15241524 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
@@ -1543,7 +1543,7 @@ mod tests {
15431543
15441544 #[ test]
15451545 fn fails_parsing_invoice_with_extra_tlv_records ( ) {
1546- let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1546+ let invoice = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) . into ( ) )
15471547 . amount_msats ( 1000 )
15481548 . build ( ) . unwrap ( )
15491549 . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
0 commit comments