File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ use crate::offers::invoice_error::InvoiceError;
55
55
use crate :: offers:: invoice_request:: { InvoiceRequest , InvoiceRequestFields } ;
56
56
use crate :: offers:: parse:: Bolt12SemanticError ;
57
57
use crate :: onion_message:: messenger:: { Destination , PeeledOnion } ;
58
+ use crate :: offers:: offer:: Amount ;
58
59
use crate :: onion_message:: offers:: OffersMessage ;
59
60
use crate :: onion_message:: packet:: ParsedOnionMessageContents ;
60
61
use crate :: routing:: gossip:: { NodeAlias , NodeId } ;
@@ -1607,9 +1608,9 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() {
1607
1608
reconnect_nodes ( args) ;
1608
1609
1609
1610
let offer = alice. node
1610
- . create_offer_builder ( Some ( absolute_expiry ) ) . unwrap ( )
1611
- . amount_msats ( 10_000_000 )
1612
- . build ( ) . unwrap ( ) ;
1611
+ . create_offer_builder ( None ) . unwrap ( )
1612
+ . amount ( Amount :: Currency { iso4217_code : * b"USD" , amount : 6_000 } )
1613
+ . build_unchecked ( ) ;
1613
1614
1614
1615
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1615
1616
@@ -1771,8 +1772,9 @@ fn fails_creating_invoice_request_without_blinded_reply_path() {
1771
1772
1772
1773
let offer = alice. node
1773
1774
. create_offer_builder ( None ) . unwrap ( )
1774
- . amount_msats ( 10_000_000 )
1775
- . build ( ) . unwrap ( ) ;
1775
+ . amount ( Amount :: Currency { iso4217_code : * b"USD" , amount : 6_000 } )
1776
+ . build_unchecked ( ) ;
1777
+
1776
1778
1777
1779
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1778
1780
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ macro_rules! offer_builder_methods { (
310
310
/// Sets the [`Offer::amount`].
311
311
///
312
312
/// Successive calls to this method will override the previous setting.
313
- pub ( super ) fn amount( $( $self_mut) * $self: $self_type, amount: Amount ) -> $return_type {
313
+ pub ( crate ) fn amount( $( $self_mut) * $self: $self_type, amount: Amount ) -> $return_type {
314
314
$self. offer. amount = Some ( amount) ;
315
315
$return_value
316
316
}
@@ -460,7 +460,7 @@ macro_rules! offer_builder_test_methods { (
460
460
}
461
461
462
462
#[ cfg_attr( c_bindings, allow( dead_code) ) ]
463
- pub ( super ) fn build_unchecked( $self: $self_type) -> Offer {
463
+ pub ( crate ) fn build_unchecked( $self: $self_type) -> Offer {
464
464
$self. build_without_checks( )
465
465
}
466
466
} }
You can’t perform that action at this time.
0 commit comments