Fix naming

This commit is contained in:
Braydon Fuller 2014-12-12 12:07:15 -05:00
parent 683ac93c0b
commit 93502d1523
3 changed files with 3 additions and 3 deletions

View File

@ -313,7 +313,7 @@ Address.fromString = function(str, network, type) {
* @returns {Address} A new valid instance of an Address
*/
Address.fromJSON = function fromJSON(json) {
if (JSUtil.isValidJson(json)) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
var hashBuffer = new Buffer(json.hash, 'hex');

View File

@ -63,7 +63,7 @@ Object.keys(UNITS).forEach(function(key) {
* @returns {Unit} A Unit instance
*/
Unit.fromJSON = function fromJSON(json){
if (JSUtil.isValidJson(json)) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
return new Unit(json.amount, json.code);

View File

@ -68,7 +68,7 @@ URI.fromString = function fromString(str) {
* @returns {URI} A new instance of a URI
*/
URI.fromJSON = function fromJSON(json) {
if (JSUtil.isValidJson(json)) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
return new URI(json);