diff --git a/src/hdnode.js b/src/hdnode.js index 9f0828e..837cf8a 100644 --- a/src/hdnode.js +++ b/src/hdnode.js @@ -15,11 +15,11 @@ function findBIP32ParamsByVersion(version) { for (var name in networks) { var network = networks[name] - for (var type in network.bip32) { - if (version != network.bip32[type]) continue + if (version === network.bip32.private || + version === network.bip32.public) { return { - isPrivate: (type === 'private'), + isPrivate: (version === network.bip32.private), network: network } }