Browse Source

Merge pull request #735 from braydonf/bug/js-util-naming

Fixed issue with js util naming
patch-2
Braydon Fuller 10 years ago
parent
commit
feb3aa3150
  1. 2
      lib/privatekey.js
  2. 2
      lib/publickey.js

2
lib/privatekey.js

@ -189,7 +189,7 @@ PrivateKey.fromWIF = function(str) {
* @returns {PrivateKey} A new valid instance of PrivateKey
*/
PrivateKey.fromJSON = function(json) {
if (JSUtil.isValidJson(json)) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
var bn = BN(json.bn, 'hex');

2
lib/publickey.js

@ -162,7 +162,7 @@ PublicKey._transformX = function(odd, x){
* @returns {PublicKey} A new valid instance of PublicKey
*/
PublicKey.fromJSON = function(json) {
if (JSUtil.isValidJson(json)) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
var x = BN(json.x, 'hex');

Loading…
Cancel
Save