mirror of https://github.com/embarklabs/embark.git
buildUrlFromConfig -- canonicalHost
This commit is contained in:
parent
0191ec9d24
commit
6d482cfb95
|
@ -1,5 +1,6 @@
|
||||||
let http = require('follow-redirects').http;
|
let http = require('follow-redirects').http;
|
||||||
let https = require('follow-redirects').https;
|
let https = require('follow-redirects').https;
|
||||||
|
const {canonicalHost} = require('./host');
|
||||||
|
|
||||||
const balanceRegex = /([0-9]+) ?([a-zA-Z]*)/;
|
const balanceRegex = /([0-9]+) ?([a-zA-Z]*)/;
|
||||||
|
|
||||||
|
@ -296,7 +297,7 @@ function buildUrl (protocol, host, port){
|
||||||
function buildUrlFromConfig (configObj){
|
function buildUrlFromConfig (configObj){
|
||||||
if(!configObj) throw new Error('[utils.buildUrlFromConfig]: config object must cannot be null');
|
if(!configObj) throw new Error('[utils.buildUrlFromConfig]: config object must cannot be null');
|
||||||
if(!configObj.host) throw new Error('[utils.buildUrlFromConfig]: object must contain a \'host\' property');
|
if(!configObj.host) throw new Error('[utils.buildUrlFromConfig]: object must contain a \'host\' property');
|
||||||
return this.buildUrl(configObj.protocol, configObj.host, configObj.port);
|
return this.buildUrl(configObj.protocol, canonicalHost(configObj.host), configObj.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWeiBalanceFromString(balanceString, web3){
|
function getWeiBalanceFromString(balanceString, web3){
|
||||||
|
|
Loading…
Reference in New Issue