From b9f2bd4542486eb244cdb1926064e167990874cc Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Thu, 14 Sep 2023 17:32:26 -0400 Subject: [PATCH] pclientd: use BIP44 derivation for seed phrase if passed in --- crates/bin/pclientd/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bin/pclientd/src/lib.rs b/crates/bin/pclientd/src/lib.rs index fa70b9c15c..e5ca1f07de 100644 --- a/crates/bin/pclientd/src/lib.rs +++ b/crates/bin/pclientd/src/lib.rs @@ -8,7 +8,7 @@ use clap::Parser; use directories::ProjectDirs; use penumbra_custody::policy::{AuthPolicy, PreAuthorizationPolicy}; use penumbra_custody::soft_kms::{self, SoftKms}; -use penumbra_keys::keys::{SeedPhrase, SpendKey}; +use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey}; use penumbra_keys::FullViewingKey; use penumbra_proto::{ client::v1alpha1::oblivious_query_service_client::ObliviousQueryServiceClient, @@ -201,9 +201,9 @@ impl Opt { let (spend_key, full_viewing_key) = match (seed_phrase, view) { (Some(seed_phrase), None) => { - let spend_key = SpendKey::from_seed_phrase_bip39( + let spend_key = SpendKey::from_seed_phrase_bip44( SeedPhrase::from_str(seed_phrase.as_str())?, - 0, + &Bip44Path::new(0), ); let full_viewing_key = spend_key.full_viewing_key().clone(); (Some(spend_key), full_viewing_key)