File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -534,19 +534,8 @@ impl FromStr for DescriptorPublicKey {
534534 type Err = DescriptorKeyParseError ;
535535
536536 fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
537- // A "raw" public key without any origin is the least we accept.
538- if s. len ( ) < 64 {
539- return Err ( DescriptorKeyParseError (
540- "Key too short (<66 char), doesn't match any format" ,
541- ) ) ;
542- }
543-
544- let ( key_part, origin) = parse_key_origin ( s) ?;
545-
546- if key_part. contains ( "pub" ) {
547- let ( xpub, derivation_paths, wildcard) =
548- parse_xkey_deriv :: < bip32:: ExtendedPubKey > ( key_part) ?;
549- if derivation_paths. len ( ) > 1 {
537+ if s. contains ( "pub" ) {
538+ if s. contains ( "<" ) {
550539 DescriptorMultiExtendedPublicKey :: from_str ( s) . map ( Self :: MultiXPub )
551540 } else {
552541 DescriptorExtendedPublicKey :: from_str ( s) . map ( Self :: XPub )
You can’t perform that action at this time.
0 commit comments