X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Foffer.rs;h=887318c0c0ea8dccffad71d61ecfdaaf045da6df;hb=bd962fc2eb00f77da41c3c5de24d5a5337a2150d;hp=2d25f8d22b062d373cd02fc9c2595d34b5f4359f;hpb=efed905a4f90a3ca86b08cd6fb111e7c790ce20d;p=rust-lightning diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 2d25f8d2..887318c0 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -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 {