mirror of https://github.com/embarklabs/embark.git
bugfix(@embark/embark): fix default values so choosing different environment doesn't cause hang (#1939)
This commit is contained in:
parent
17817fc3ec
commit
eb23acb0f8
|
@ -533,7 +533,7 @@ Config.prototype.loadCommunicationConfigFile = function() {
|
|||
"available_providers": ["whisper"],
|
||||
"connection": {
|
||||
"host": defaultHost,
|
||||
"port": 8546,
|
||||
"port": 8557,
|
||||
"type": "ws"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@ const constants = require('embark-core/constants');
|
|||
|
||||
export function getBlockchainDefaults(env) {
|
||||
const defaults = {
|
||||
clientConfig: {
|
||||
miningMode: 'dev' // Mode in which the node mines. Options: dev, auto, always, off
|
||||
},
|
||||
enabled: true,
|
||||
client: constants.blockchain.clients.geth,
|
||||
proxy: true,
|
||||
|
@ -46,6 +49,7 @@ export function getContractDefaults(embarkConfigVersions) {
|
|||
"versions": versions,
|
||||
"dappConnection": [
|
||||
"$WEB3",
|
||||
"ws://localhost:8546",
|
||||
"localhost:8545"
|
||||
],
|
||||
"dappAutoEnable": true,
|
||||
|
|
|
@ -146,6 +146,10 @@ class ENS {
|
|||
|
||||
async registerConfigDomains(config, cb) {
|
||||
const defaultAccount = await this.web3DefaultAccount;
|
||||
if (!this.config.namesystemConfig.register) {
|
||||
return cb();
|
||||
}
|
||||
|
||||
async.each(Object.keys(this.config.namesystemConfig.register.subdomains), (subDomainName, eachCb) => {
|
||||
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
||||
const directivesRegExp = new RegExp(/\$(\w+\[?\d?\]?)/g);
|
||||
|
@ -165,6 +169,10 @@ class ENS {
|
|||
|
||||
const defaultAccount = await this.web3DefaultAccount;
|
||||
|
||||
if (!this.config.namesystemConfig.register) {
|
||||
return cb();
|
||||
}
|
||||
|
||||
await Promise.all(Object.keys(this.config.namesystemConfig.register.subdomains).map((subDomainName) => {
|
||||
return new Promise(async (resolve, _reject) => {
|
||||
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
||||
|
|
Loading…
Reference in New Issue