From 012466d41123864e0c304da7016b5a072d0bdfe8 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 4 Dec 2014 13:06:10 -0500 Subject: [PATCH] PublicKey: Remove compressed boolean from validation, not nessassary. --- lib/publickey.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }; /**