mirror of https://github.com/embarklabs/embark.git
Pr feedback using once
This commit is contained in:
parent
4481e6eb99
commit
4c580dd54d
|
@ -14,7 +14,6 @@ class ENS {
|
|||
this.namesConfig = embark.config.namesystemConfig;
|
||||
this.registration = this.namesConfig.register || {};
|
||||
this.embark = embark;
|
||||
this.firstDeployDone = false;
|
||||
|
||||
if (this.namesConfig === {} ||
|
||||
this.namesConfig.enabled !== true ||
|
||||
|
@ -29,15 +28,12 @@ class ENS {
|
|||
}
|
||||
|
||||
registerEvents() {
|
||||
this.embark.registerActionForEvent("contracts:deploy:afterAll", this.setProviderAndRegisterDomains.bind(this));
|
||||
this.events.once("contracts:deploy:afterAll", this.setProviderAndRegisterDomains.bind(this));
|
||||
|
||||
this.events.setCommandHandler("storage:ens:associate", this.associateStorageToEns.bind(this));
|
||||
}
|
||||
|
||||
setProviderAndRegisterDomains(cb) {
|
||||
if(this.firstDeployDone) {
|
||||
return cb();
|
||||
}
|
||||
const self = this;
|
||||
async.parallel([
|
||||
function getENSRegistry(paraCb) {
|
||||
|
@ -82,7 +78,6 @@ class ENS {
|
|||
return cb();
|
||||
}
|
||||
self.registerConfigDomains(config, cb);
|
||||
self.firstDeployDone = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue