PublicKey: Remove compressed boolean from validation, not nessassary.
This commit is contained in:
parent
ae80ca8678
commit
012466d411
@ -248,10 +248,10 @@ PublicKey.fromX = function(odd, x) {
|
|||||||
* @param {String} [compressed] - If the public key is compressed
|
* @param {String} [compressed] - If the public key is compressed
|
||||||
* @returns {null|Error} An error if exists
|
* @returns {null|Error} An error if exists
|
||||||
*/
|
*/
|
||||||
PublicKey.getValidationError = function(data, compressed) {
|
PublicKey.getValidationError = function(data) {
|
||||||
var error;
|
var error;
|
||||||
try {
|
try {
|
||||||
new PublicKey(data, compressed);
|
new PublicKey(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
@ -266,8 +266,8 @@ PublicKey.getValidationError = function(data, compressed) {
|
|||||||
* @param {String} [compressed] - If the public key is compressed
|
* @param {String} [compressed] - If the public key is compressed
|
||||||
* @returns {Boolean} If the public key would be valid
|
* @returns {Boolean} If the public key would be valid
|
||||||
*/
|
*/
|
||||||
PublicKey.isValid = function(data, compressed) {
|
PublicKey.isValid = function(data) {
|
||||||
return !PublicKey.getValidationError(data, compressed);
|
return !PublicKey.getValidationError(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user