Fix naming
This commit is contained in:
parent
683ac93c0b
commit
93502d1523
@ -313,7 +313,7 @@ Address.fromString = function(str, network, type) {
|
|||||||
* @returns {Address} A new valid instance of an Address
|
* @returns {Address} A new valid instance of an Address
|
||||||
*/
|
*/
|
||||||
Address.fromJSON = function fromJSON(json) {
|
Address.fromJSON = function fromJSON(json) {
|
||||||
if (JSUtil.isValidJson(json)) {
|
if (JSUtil.isValidJSON(json)) {
|
||||||
json = JSON.parse(json);
|
json = JSON.parse(json);
|
||||||
}
|
}
|
||||||
var hashBuffer = new Buffer(json.hash, 'hex');
|
var hashBuffer = new Buffer(json.hash, 'hex');
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Object.keys(UNITS).forEach(function(key) {
|
|||||||
* @returns {Unit} A Unit instance
|
* @returns {Unit} A Unit instance
|
||||||
*/
|
*/
|
||||||
Unit.fromJSON = function fromJSON(json){
|
Unit.fromJSON = function fromJSON(json){
|
||||||
if (JSUtil.isValidJson(json)) {
|
if (JSUtil.isValidJSON(json)) {
|
||||||
json = JSON.parse(json);
|
json = JSON.parse(json);
|
||||||
}
|
}
|
||||||
return new Unit(json.amount, json.code);
|
return new Unit(json.amount, json.code);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ URI.fromString = function fromString(str) {
|
|||||||
* @returns {URI} A new instance of a URI
|
* @returns {URI} A new instance of a URI
|
||||||
*/
|
*/
|
||||||
URI.fromJSON = function fromJSON(json) {
|
URI.fromJSON = function fromJSON(json) {
|
||||||
if (JSUtil.isValidJson(json)) {
|
if (JSUtil.isValidJSON(json)) {
|
||||||
json = JSON.parse(json);
|
json = JSON.parse(json);
|
||||||
}
|
}
|
||||||
return new URI(json);
|
return new URI(json);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user