diff --git a/src/zcash/address/bip44.cpp b/src/zcash/address/bip44.cpp index 075c2491f..1dd5679bd 100644 --- a/src/zcash/address/bip44.cpp +++ b/src/zcash/address/bip44.cpp @@ -50,11 +50,7 @@ std::optional> 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> 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); }