diff --git a/lib/modules/ens/embarkjs.js b/lib/modules/ens/embarkjs.js index 4b3ac948..1f37856c 100644 --- a/lib/modules/ens/embarkjs.js +++ b/lib/modules/ens/embarkjs.js @@ -261,14 +261,19 @@ __embarkENS.setProvider = function () { self.ens = new web3.eth.Contract(self.registryInterface, registryAddresses[id]); } // todo: deploy at this point - return undefined; - }); + }).catch(e => { + if (e.message.indexOf('Provider not set or invalid') > -1) { + console.warn('ENS is not available in this chain'); + return; + } + console.error(e); + }); }; __embarkENS.resolve = function(name) { const self = this; - if (self.ens === undefined) return undefined; + if (self.ens === undefined) return; let node = namehash.hash(name); @@ -283,7 +288,7 @@ __embarkENS.resolve = function(name) { __embarkENS.lookup = function(address) { const self = this; - if (self.ens === undefined) return undefined; + if (self.ens === undefined) return; if (address.startsWith("0x")) address = address.slice(2);