aboutsummaryrefslogtreecommitdiff
path: root/src/util/bip32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/bip32.cpp')
-rw-r--r--src/util/bip32.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/bip32.cpp b/src/util/bip32.cpp
index c4b7120394..ed0a925a72 100644
--- a/src/util/bip32.cpp
+++ b/src/util/bip32.cpp
@@ -51,17 +51,17 @@ bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypa
return true;
}
-std::string FormatHDKeypath(const std::vector<uint32_t>& path)
+std::string FormatHDKeypath(const std::vector<uint32_t>& path, bool apostrophe)
{
std::string ret;
for (auto i : path) {
ret += strprintf("/%i", (i << 1) >> 1);
- if (i >> 31) ret += '\'';
+ if (i >> 31) ret += apostrophe ? '\'' : 'h';
}
return ret;
}
-std::string WriteHDKeypath(const std::vector<uint32_t>& keypath)
+std::string WriteHDKeypath(const std::vector<uint32_t>& keypath, bool apostrophe)
{
- return "m" + FormatHDKeypath(keypath);
+ return "m" + FormatHDKeypath(keypath, apostrophe);
}