fix handling of non-standard key derivations when writing output descriptors

This commit is contained in:
Craig Raw 2026-01-15 10:32:25 +02:00
parent 03e2e76b24
commit 5cc1b0c551

View File

@ -662,8 +662,8 @@ public class OutputDescriptor {
keyBuilder.append("[");
keyBuilder.append(keyDerivation.getMasterFingerprint());
if(!keyDerivation.getDerivation().isEmpty()) {
String path = keyDerivation.getDerivationPath().replaceFirst("^m?/", "/");
keyBuilder.append(useApostrophes ? path : path.replace('\'', 'h'));
String path = KeyDerivation.writePath(KeyDerivation.parsePath(keyDerivation.getDerivationPath()), useApostrophes).substring(1);
keyBuilder.append(path);
}
keyBuilder.append("]");
}