Address PR feedback

This commit is contained in:
Anthony Laibe 2018-09-28 15:06:58 +01:00
parent c6b0c34d8c
commit bee3f2f0c5
2 changed files with 10 additions and 8 deletions

View File

@ -291,9 +291,7 @@ class EmbarkController {
engine.startService("namingSystem"); engine.startService("namingSystem");
engine.startService("console"); engine.startService("console");
engine.startService("pluginCommand"); engine.startService("pluginCommand");
engine.events.on('check:backOnline:Ethereum', function () { engine.events.on('check:backOnline:Ethereum', () => callback());
callback();
});
}, },
function ipcConnect(callback) { function ipcConnect(callback) {
// Do specific work in case we are connected to a socket: // Do specific work in case we are connected to a socket:

View File

@ -29,8 +29,12 @@ const DEFAULT_ENS_CONTRACTS_CONFIG = {
} }
}; };
const MAINNET_ID = '1';
const ROPSTEN_ID = '3';
const RINKEBY_ID = '4';
const ENS_CONTRACTS_CONFIG = { const ENS_CONTRACTS_CONFIG = {
"1": { [MAINNET_ID]: {
"contracts": { "contracts": {
"ENSRegistry": { "ENSRegistry": {
"address": "0x314159265dd8dbb310642f98f50c066173c1259b", "address": "0x314159265dd8dbb310642f98f50c066173c1259b",
@ -44,7 +48,7 @@ const ENS_CONTRACTS_CONFIG = {
} }
} }
}, },
"3": { [ROPSTEN_ID]: {
"contracts": { "contracts": {
"ENSRegistry": { "ENSRegistry": {
"address": "0x112234455c3a32fd11230c42e7bccd4a84e02010", "address": "0x112234455c3a32fd11230c42e7bccd4a84e02010",
@ -58,7 +62,7 @@ const ENS_CONTRACTS_CONFIG = {
} }
} }
}, },
"4": { [RINKEBY_ID]: {
"contracts": { "contracts": {
"ENSRegistry": { "ENSRegistry": {
"address": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A", "address": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A",
@ -143,9 +147,9 @@ class ENS {
} }
self.events.request('blockchain:networkId', (networkId) => { self.events.request('blockchain:networkId', (networkId) => {
const isKnownNetworks = Object.keys(ENS_CONTRACTS_CONFIG).includes(networkId); const isKnownNetwork = Object.keys(ENS_CONTRACTS_CONFIG).includes(networkId);
const shouldRegisterSubdomain = self.registration && self.registration.subdomains && Object.keys(self.registration.subdomains).length; const shouldRegisterSubdomain = self.registration && self.registration.subdomains && Object.keys(self.registration.subdomains).length;
if (isKnownNetworks || !shouldRegisterSubdomain) { if (isKnownNetwork || !shouldRegisterSubdomain) {
return cb(); return cb();
} }
self.registerConfigDomains(config, cb); self.registerConfigDomains(config, cb);