X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Finvoice.rs;h=9d83ce899b153d836288facf83b82e7515b1dc90;hb=3880e69237d7f6a33db1912176de5a745ea99b41;hp=b0783a306e5c5b0e99a0046180599cfa89bf74e2;hpb=1cad430e14108710c826adebbfab2a5ea64a6a5a;p=rust-lightning diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index b0783a30..9d83ce89 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -146,7 +146,7 @@ impl<'a> InvoiceBuilder<'a> { ) -> Result { let amount_msats = match invoice_request.amount_msats() { Some(amount_msats) => amount_msats, - None => match invoice_request.contents.offer.amount() { + None => match invoice_request.contents.inner.offer.amount() { Some(Amount::Bitcoin { amount_msats }) => { amount_msats.checked_mul(invoice_request.quantity().unwrap_or(1)) .ok_or(SemanticError::InvalidAmount)? @@ -161,7 +161,7 @@ impl<'a> InvoiceBuilder<'a> { fields: InvoiceFields { payment_paths, created_at, relative_expiry: None, payment_hash, amount_msats, fallbacks: None, features: Bolt12InvoiceFeatures::empty(), - signing_pubkey: invoice_request.contents.offer.signing_pubkey(), + signing_pubkey: invoice_request.contents.inner.offer.signing_pubkey(), }, }; @@ -493,7 +493,8 @@ impl InvoiceContents { #[cfg(feature = "std")] fn is_offer_or_refund_expired(&self) -> bool { match self { - InvoiceContents::ForOffer { invoice_request, .. } => invoice_request.offer.is_expired(), + InvoiceContents::ForOffer { invoice_request, .. } => + invoice_request.inner.offer.is_expired(), InvoiceContents::ForRefund { refund, .. } => refund.is_expired(), } }