fix ens with no registration

This commit is contained in:
Jonathan Rainville 2018-10-23 11:59:43 -04:00
parent f40cf609a8
commit c201b6e491
2 changed files with 3 additions and 8 deletions

View File

@ -67,7 +67,6 @@ class Engine {
"deployment": this.deploymentService,
"fileWatcher": this.fileWatchService,
"webServer": this.webServerService,
"namingSystem": this.namingSystem,
"console": this.console,
"web3": this.web3Service,
"libraryManager": this.libraryManagerService,
@ -75,7 +74,6 @@ class Engine {
"storage": this.storageService,
"pluginCommand": this.pluginCommandService,
"graph": this.graphService,
"pluginCommand": this.pluginCommandService,
"testRunner": this.testRunnerService,
"codeCoverage": this.codeCoverageService,
"scaffolding": this.scaffoldingService,
@ -151,10 +149,6 @@ class Engine {
this.registerModule('plugin_cmd', {embarkConfigFile: this.embarkConfig, embarkConfig: this.config.embarkConfig, packageFile: 'package.json'});
}
namingSystem(_options) {
this.registerModule('ens');
}
console(_options) {
this.registerModule('console', {
events: this.events,

View File

@ -246,6 +246,7 @@ class ENS {
}
configureContractsAndRegister(cb) {
const NO_REGISTRATION = 'NO_REGISTRATION';
const self = this;
if (self.configured) {
return cb();
@ -269,7 +270,7 @@ class ENS {
},
function registrar(next) {
if (!self.registration || !self.registration.rootDomain) {
return next();
return next(NO_REGISTRATION);
}
const registryAddress = self.ensConfig.ENSRegistry.deployedAddress;
const rootNode = namehash.hash(self.registration.rootDomain);
@ -347,7 +348,7 @@ class ENS {
}
], (err) => {
self.configured = true;
if (err) {
if (err && err !== NO_REGISTRATION) {
self.logger.error('Error while deploying ENS contracts');
self.logger.error(err.message || err);
return cb(err);