Ens config is run only once
This commit is contained in:
parent
a622f22dcd
commit
4481e6eb99
|
@ -14,6 +14,7 @@ class ENS {
|
||||||
this.namesConfig = embark.config.namesystemConfig;
|
this.namesConfig = embark.config.namesystemConfig;
|
||||||
this.registration = this.namesConfig.register || {};
|
this.registration = this.namesConfig.register || {};
|
||||||
this.embark = embark;
|
this.embark = embark;
|
||||||
|
this.firstDeployDone = false;
|
||||||
|
|
||||||
if (this.namesConfig === {} ||
|
if (this.namesConfig === {} ||
|
||||||
this.namesConfig.enabled !== true ||
|
this.namesConfig.enabled !== true ||
|
||||||
|
@ -34,6 +35,9 @@ class ENS {
|
||||||
}
|
}
|
||||||
|
|
||||||
setProviderAndRegisterDomains(cb) {
|
setProviderAndRegisterDomains(cb) {
|
||||||
|
if(this.firstDeployDone) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
const self = this;
|
const self = this;
|
||||||
async.parallel([
|
async.parallel([
|
||||||
function getENSRegistry(paraCb) {
|
function getENSRegistry(paraCb) {
|
||||||
|
@ -78,6 +82,7 @@ class ENS {
|
||||||
return cb();
|
return cb();
|
||||||
}
|
}
|
||||||
self.registerConfigDomains(config, cb);
|
self.registerConfigDomains(config, cb);
|
||||||
|
self.firstDeployDone = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue