Use Bip44TransparentAccountKeyPath() for Bip44AccountChains keypath construction.
This commit is contained in:
parent
16ba83ab1e
commit
8d6d178a47
|
@ -50,11 +50,7 @@ std::optional<std::pair<CKey, HDKeyPath>> libzcash::Bip44AccountChains::DeriveEx
|
|||
auto childKey = external.Derive(addrIndex);
|
||||
if (!childKey.has_value()) return std::nullopt;
|
||||
|
||||
auto hdKeypath = "m/44'/"
|
||||
+ std::to_string(bip44CoinType) + "'/"
|
||||
+ std::to_string(accountId) + "'/"
|
||||
+ "0/"
|
||||
+ std::to_string(addrIndex);
|
||||
auto hdKeypath = Bip44TransparentAccountKeyPath(bip44CoinType, accountId) + "/0/" + std::to_string(addrIndex);
|
||||
|
||||
return std::make_pair(childKey.value().key, hdKeypath);
|
||||
}
|
||||
|
@ -63,11 +59,7 @@ std::optional<std::pair<CKey, HDKeyPath>> libzcash::Bip44AccountChains::DeriveIn
|
|||
auto childKey = internal.Derive(addrIndex);
|
||||
if (!childKey.has_value()) return std::nullopt;
|
||||
|
||||
auto hdKeypath = "m/44'/"
|
||||
+ std::to_string(bip44CoinType) + "'/"
|
||||
+ std::to_string(accountId) + "'/"
|
||||
+ "1/"
|
||||
+ std::to_string(addrIndex);
|
||||
auto hdKeypath = Bip44TransparentAccountKeyPath(bip44CoinType, accountId) + "/1/" + std::to_string(addrIndex);
|
||||
|
||||
return std::make_pair(childKey.value().key, hdKeypath);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue