Skip to content

Commit

Permalink
refactor: Simplify logic by adding a check for empty path before deri…
Browse files Browse the repository at this point in the history
…ving the key
  • Loading branch information
S0c5 committed Apr 30, 2024
1 parent 7e91621 commit e3861f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libwallet/src/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ mod utils {
where
Self: Sized,
{
if path.is_empty() {
return self.sub.derive("").into();
}

match &path[..2] {
#[cfg(feature = "substrate")]
"//" => self.sub.derive(path).into(),
Expand Down

0 comments on commit e3861f2

Please sign in to comment.