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"],
|
"available_providers": ["whisper"],
|
||||||
"connection": {
|
"connection": {
|
||||||
"host": defaultHost,
|
"host": defaultHost,
|
||||||
"port": 8546,
|
"port": 8557,
|
||||||
"type": "ws"
|
"type": "ws"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@ const constants = require('embark-core/constants');
|
||||||
|
|
||||||
export function getBlockchainDefaults(env) {
|
export function getBlockchainDefaults(env) {
|
||||||
const defaults = {
|
const defaults = {
|
||||||
|
clientConfig: {
|
||||||
|
miningMode: 'dev' // Mode in which the node mines. Options: dev, auto, always, off
|
||||||
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
client: constants.blockchain.clients.geth,
|
client: constants.blockchain.clients.geth,
|
||||||
proxy: true,
|
proxy: true,
|
||||||
|
@ -46,6 +49,7 @@ export function getContractDefaults(embarkConfigVersions) {
|
||||||
"versions": versions,
|
"versions": versions,
|
||||||
"dappConnection": [
|
"dappConnection": [
|
||||||
"$WEB3",
|
"$WEB3",
|
||||||
|
"ws://localhost:8546",
|
||||||
"localhost:8545"
|
"localhost:8545"
|
||||||
],
|
],
|
||||||
"dappAutoEnable": true,
|
"dappAutoEnable": true,
|
||||||
|
|
|
@ -146,6 +146,10 @@ class ENS {
|
||||||
|
|
||||||
async registerConfigDomains(config, cb) {
|
async registerConfigDomains(config, cb) {
|
||||||
const defaultAccount = await this.web3DefaultAccount;
|
const defaultAccount = await this.web3DefaultAccount;
|
||||||
|
if (!this.config.namesystemConfig.register) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
|
||||||
async.each(Object.keys(this.config.namesystemConfig.register.subdomains), (subDomainName, eachCb) => {
|
async.each(Object.keys(this.config.namesystemConfig.register.subdomains), (subDomainName, eachCb) => {
|
||||||
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
||||||
const directivesRegExp = new RegExp(/\$(\w+\[?\d?\]?)/g);
|
const directivesRegExp = new RegExp(/\$(\w+\[?\d?\]?)/g);
|
||||||
|
@ -165,6 +169,10 @@ class ENS {
|
||||||
|
|
||||||
const defaultAccount = await this.web3DefaultAccount;
|
const defaultAccount = await this.web3DefaultAccount;
|
||||||
|
|
||||||
|
if (!this.config.namesystemConfig.register) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
|
||||||
await Promise.all(Object.keys(this.config.namesystemConfig.register.subdomains).map((subDomainName) => {
|
await Promise.all(Object.keys(this.config.namesystemConfig.register.subdomains).map((subDomainName) => {
|
||||||
return new Promise(async (resolve, _reject) => {
|
return new Promise(async (resolve, _reject) => {
|
||||||
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
||||||
|
|
Loading…
Reference in New Issue