mirror of https://github.com/embarklabs/embark.git
disable ens if it is not enabled
This commit is contained in:
parent
3edf7c2419
commit
960202dee9
|
@ -14,6 +14,13 @@ class ENS {
|
|||
this.registration = this.namesConfig.register || {};
|
||||
this.embark = embark;
|
||||
|
||||
if (this.namesConfig === {} ||
|
||||
this.namesConfig.enabled !== true ||
|
||||
this.namesConfig.available_providers.indexOf('ens') < 0 ||
|
||||
this.namesConfig.provider !== 'ens') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.addENSToEmbarkJS();
|
||||
this.configureContracts();
|
||||
this.registerEvents();
|
||||
|
@ -179,14 +186,6 @@ class ENS {
|
|||
|
||||
addENSToEmbarkJS() {
|
||||
const self = this;
|
||||
// TODO: make this a shouldAdd condition
|
||||
if (this.namesConfig === {}) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((this.namesConfig.available_providers.indexOf('ens') < 0) && (this.namesConfig.provider !== 'ens' || this.namesConfig.enabled !== true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get namehash, import it into file
|
||||
self.events.request("version:get:eth-ens-namehash", function (EnsNamehashVersion) {
|
||||
|
|
Loading…
Reference in New Issue