From 50effc0a6cd28dda254f5f4661fac26b7721372a Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 21 Sep 2018 18:26:18 -0400 Subject: [PATCH] revert change made on ens module --- lib/modules/ens/index.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index 9da955bb..5339e6d0 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -286,23 +286,21 @@ class ENS { if (this.registration && this.registration.rootDomain) { // Register root domain if it is defined - if (this.isDev || this.env === 'privatenet' || this.env === 'development') { - const rootNode = namehash.hash(this.registration.rootDomain); - config.default.contracts['FIFSRegistrar'] = { - "deploy": true, - "silent": true, - "args": ["$ENSRegistry", rootNode], - "onDeploy": [ - `ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}).then(() => { + const rootNode = namehash.hash(this.registration.rootDomain); + config.default.contracts['FIFSRegistrar'] = { + "deploy": true, + "silent": true, + "args": ["$ENSRegistry", rootNode], + "onDeploy": [ + `ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}).then(() => { ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send({from: web3.eth.defaultAccount}); var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '${reverseAddrSuffix}'); ENSRegistry.methods.setResolver(reverseNode, "$Resolver").send({from: web3.eth.defaultAccount}); Resolver.methods.setAddr('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}); Resolver.methods.setName(reverseNode, '${this.registration.rootDomain}').send({from: web3.eth.defaultAccount}); })` - ] - }; - } + ] + }; } config.privatenet = config.development; this.embark.registerContractConfiguration(config);