diff --git a/lib/publickey.js b/lib/publickey.js index eb8fbf7..76c854f 100644 --- a/lib/publickey.js +++ b/lib/publickey.js @@ -248,10 +248,10 @@ PublicKey.fromX = function(odd, x) { * @param {String} [compressed] - If the public key is compressed * @returns {null|Error} An error if exists */ -PublicKey.getValidationError = function(data, compressed) { +PublicKey.getValidationError = function(data) { var error; try { - new PublicKey(data, compressed); + new PublicKey(data); } catch (e) { error = e; } @@ -266,8 +266,8 @@ PublicKey.getValidationError = function(data, compressed) { * @param {String} [compressed] - If the public key is compressed * @returns {Boolean} If the public key would be valid */ -PublicKey.isValid = function(data, compressed) { - return !PublicKey.getValidationError(data, compressed); +PublicKey.isValid = function(data) { + return !PublicKey.getValidationError(data); }; /**