diff --git a/lightning/src/ln/offers_tests.rs b/lightning/src/ln/offers_tests.rs index 7ff4bdfed5d..940da1f7763 100644 --- a/lightning/src/ln/offers_tests.rs +++ b/lightning/src/ln/offers_tests.rs @@ -55,6 +55,7 @@ use crate::offers::invoice_error::InvoiceError; use crate::offers::invoice_request::{InvoiceRequest, InvoiceRequestFields}; use crate::offers::parse::Bolt12SemanticError; use crate::onion_message::messenger::{Destination, PeeledOnion}; +use crate::offers::offer::Amount; use crate::onion_message::offers::OffersMessage; use crate::onion_message::packet::ParsedOnionMessageContents; use crate::routing::gossip::{NodeAlias, NodeId}; @@ -1607,9 +1608,9 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() { reconnect_nodes(args); let offer = alice.node - .create_offer_builder(Some(absolute_expiry)).unwrap() - .amount_msats(10_000_000) - .build().unwrap(); + .create_offer_builder(None).unwrap() + .amount(Amount::Currency {iso4217_code: *b"USD", amount: 6_000}) + .build_unchecked(); let payment_id = PaymentId([1; 32]); @@ -1771,8 +1772,9 @@ fn fails_creating_invoice_request_without_blinded_reply_path() { let offer = alice.node .create_offer_builder(None).unwrap() - .amount_msats(10_000_000) - .build().unwrap(); + .amount(Amount::Currency {iso4217_code: *b"USD", amount: 6_000}) + .build_unchecked(); + let payment_id = PaymentId([1; 32]); diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 5f640d65f2f..7935edf7944 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -310,7 +310,7 @@ macro_rules! offer_builder_methods { ( /// Sets the [`Offer::amount`]. /// /// Successive calls to this method will override the previous setting. - pub(super) fn amount($($self_mut)* $self: $self_type, amount: Amount) -> $return_type { + pub(crate) fn amount($($self_mut)* $self: $self_type, amount: Amount) -> $return_type { $self.offer.amount = Some(amount); $return_value } @@ -460,7 +460,7 @@ macro_rules! offer_builder_test_methods { ( } #[cfg_attr(c_bindings, allow(dead_code))] - pub(super) fn build_unchecked($self: $self_type) -> Offer { + pub(crate) fn build_unchecked($self: $self_type) -> Offer { $self.build_without_checks() } } }