Check chain hash for channel announcement and update
[rust-lightning] / lightning / src / offers / offer.rs
index 2d25f8d22b062d373cd02fc9c2595d34b5f4359f..887318c0c0ea8dccffad71d61ecfdaaf045da6df 100644 (file)
@@ -384,7 +384,7 @@ impl Offer {
        /// A complete description of the purpose of the payment. Intended to be displayed to the user
        /// but with the caveat that it has not been verified in any way.
        pub fn description(&self) -> PrintableString {
-               PrintableString(&self.contents.description)
+               self.contents.description()
        }
 
        /// Features pertaining to the offer.
@@ -536,6 +536,10 @@ impl OfferContents {
                self.metadata.as_ref().and_then(|metadata| metadata.as_bytes())
        }
 
+       pub fn description(&self) -> PrintableString {
+               PrintableString(&self.description)
+       }
+
        #[cfg(feature = "std")]
        pub(super) fn is_expired(&self) -> bool {
                match self.absolute_expiry {