icepick: don't open a Keyfork client if not deriving keys

This commit is contained in:
Ryan Heywood 2024-12-20 19:56:37 -05:00
parent 46cf4129ac
commit 6a3ab8a64b
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ pub fn derive_keys(
path_prefix: &DerivationPath, path_prefix: &DerivationPath,
accounts: &[DerivationIndex], accounts: &[DerivationIndex],
) -> Vec<Vec<u8>> { ) -> Vec<Vec<u8>> {
if accounts.is_empty() {
return vec![];
}
let mut derived_keys = vec![]; let mut derived_keys = vec![];
let mut client = keyforkd_client::Client::discover_socket().expect("keyforkd started"); let mut client = keyforkd_client::Client::discover_socket().expect("keyforkd started");
for account in accounts { for account in accounts {