diff --git a/src-tauri/src/hwi/interface.rs b/src-tauri/src/hwi/interface.rs index 59b2121..e84667b 100644 --- a/src-tauri/src/hwi/interface.rs +++ b/src-tauri/src/hwi/interface.rs @@ -145,7 +145,8 @@ impl HWIClient { path: &DerivationPath, expert: bool, ) -> Result { - let output = self.implementation.get_xpub(&path.to_string(), expert)?; + let prefixed_path = format!("m/{}", path); + let output = self.implementation.get_xpub(&prefixed_path, expert)?; deserialize_obj!(&output) } @@ -155,9 +156,8 @@ impl HWIClient { message: &str, path: &DerivationPath, ) -> Result { - let output = self - .implementation - .sign_message(message, &path.to_string())?; + let prefixed_path = format!("m/{}", path); + let output = self.implementation.sign_message(message, &prefixed_path)?; deserialize_obj!(&output) } @@ -183,7 +183,7 @@ impl HWIClient { start: u32, end: u32, ) -> Result, Error> { - let path_str = path.map(|p| p.to_string()); + let path_str = path.map(|p| format!("m/{}/*", p)); let output = self.implementation.get_keypool( keypool, internal, @@ -222,9 +222,10 @@ impl HWIClient { path: &DerivationPath, address_type: HWIAddressType, ) -> Result { + let prefixed_path = format!("m/{}", path); let output = self .implementation - .display_address_with_path(&path.to_string(), address_type)?; + .display_address_with_path(&prefixed_path, address_type)?; deserialize_obj!(&output) }