Only require description when offer has an amount
[rust-lightning] / lightning / src / offers / parse.rs
index 400cf51a2944d47cc0afd19e227acb3216242959..3b9b04a5c06f8f00d898cec70aec46f6be600e3e 100644 (file)
 
 use bitcoin::bech32;
 use bitcoin::secp256k1;
-use core::convert::TryFrom;
 use crate::io;
 use crate::ln::msgs::DecodeError;
 use crate::util::ser::SeekReadable;
 
+#[allow(unused_imports)]
 use crate::prelude::*;
 
 #[cfg(not(fuzzing))]
@@ -27,10 +27,10 @@ pub use sealed::Bech32Encode;
 mod sealed {
        use bitcoin::bech32;
        use bitcoin::bech32::{FromBase32, ToBase32};
-       use core::convert::TryFrom;
        use core::fmt;
        use super::Bolt12ParseError;
 
+       #[allow(unused_imports)]
        use crate::prelude::*;
 
        /// Indicates a message can be encoded using bech32.
@@ -183,6 +183,8 @@ pub enum Bolt12SemanticError {
        DuplicatePaymentId,
        /// Blinded paths were expected but were missing.
        MissingPaths,
+       /// Blinded paths were provided but were not expected.
+       UnexpectedPaths,
        /// The blinded payinfo given does not match the number of blinded path hops.
        InvalidPayInfo,
        /// An invoice creation time was expected but was missing.