From 9e0f11f71c8325103e0871d7502f2bf5bb9c8efc Mon Sep 17 00:00:00 2001 From: Michele Balistreri Date: Mon, 14 Nov 2022 09:20:59 +0100 Subject: [PATCH] chain code in pubkeys --- .../java/im/status/keycard/applet/BIP32KeyPair.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/main/java/im/status/keycard/applet/BIP32KeyPair.java b/lib/src/main/java/im/status/keycard/applet/BIP32KeyPair.java index 39048dd..8c612d9 100644 --- a/lib/src/main/java/im/status/keycard/applet/BIP32KeyPair.java +++ b/lib/src/main/java/im/status/keycard/applet/BIP32KeyPair.java @@ -66,13 +66,13 @@ public class BIP32KeyPair { tlv.unreadLastTag(); privKey = tlv.readPrimitive(TLV_PRIV_KEY); 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); }