chain code in pubkeys

This commit is contained in:
Michele Balistreri 2022-11-14 09:20:59 +01:00
parent 64aece4837
commit 9e0f11f71c
1 changed files with 5 additions and 5 deletions

View File

@ -66,13 +66,13 @@ public class BIP32KeyPair {
tlv.unreadLastTag(); tlv.unreadLastTag();
privKey = tlv.readPrimitive(TLV_PRIV_KEY); privKey = tlv.readPrimitive(TLV_PRIV_KEY);
tag = tlv.readTag(); tag = tlv.readTag();
if (tag == TLV_CHAIN_CODE) {
tlv.unreadLastTag();
chainCode = tlv.readPrimitive(TLV_CHAIN_CODE);
}
} }
if (tag == TLV_CHAIN_CODE) {
tlv.unreadLastTag();
chainCode = tlv.readPrimitive(TLV_CHAIN_CODE);
}
return new BIP32KeyPair(privKey, chainCode, pubKey); return new BIP32KeyPair(privKey, chainCode, pubKey);
} }