diff --git a/src/descriptors.rs b/src/descriptors.rs index 40fabdc2..2dc6e300 100644 --- a/src/descriptors.rs +++ b/src/descriptors.rs @@ -20,7 +20,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug)] pub enum DescCreationError { InsaneTimelock(u32), - InvalidKey(descriptor::DescriptorPublicKey), + InvalidKey(Box), Miniscript(miniscript::Error), IncompatibleDesc, DerivedKeyParsing, @@ -233,7 +233,7 @@ impl str::FromStr for MultipathDescriptor { } }); if let Some(key) = invalid_key { - return Err(DescCreationError::InvalidKey(key)); + return Err(DescCreationError::InvalidKey(key.into())); } // Semantic of the Miniscript must be either the owner now, or the heir after @@ -334,7 +334,7 @@ impl MultipathDescriptor { .iter() .find(|k| !is_valid_desc_key(k)) { - return Err(DescCreationError::InvalidKey((**key).clone())); + return Err(DescCreationError::InvalidKey((**key).clone().into())); } let owner_pk = Miniscript::from_ast(Terminal::Check(sync::Arc::from( diff --git a/src/jsonrpc/api.rs b/src/jsonrpc/api.rs index dd0e3a8a..0d034643 100644 --- a/src/jsonrpc/api.rs +++ b/src/jsonrpc/api.rs @@ -52,7 +52,7 @@ fn update_spend(control: &DaemonControl, params: Params) -> Result