Skip to content

Commit

Permalink
Fix panic in ledger exchange (#132)
Browse files Browse the repository at this point in the history
* fix: prevent panic and improve trace

* coins-ledger@0.9.3

* clippy
  • Loading branch information
prestwich authored Jan 30, 2024
1 parent f8d200b commit 32463b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions bip32/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ impl FromStr for DerivationPath {
type Err = Bip32Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
s.to_owned()
.split('/')
s.split('/')
.filter(|v| v != &"m")
.map(try_parse_index)
.collect::<Result<Vec<u32>, Bip32Error>>()
Expand Down
2 changes: 1 addition & 1 deletion ledger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coins-ledger"
version = "0.9.2"
version = "0.9.3"
authors = [
"Summa <team@summa.one>",
"James Prestwich <james@summa.one>",
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/transports/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl LedgerAsync for Ledger {
Ok(resp) => {
debug!(
retcode = resp.retcode(),
response = hex::encode(resp.data().unwrap()),
response = resp.data().map(hex::encode),
"Received response from device"
)
}
Expand Down

0 comments on commit 32463b1

Please sign in to comment.