From c3ea2ff160ef7116ed406a61a2ccc8289966aa0d Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 25 Jul 2018 16:21:00 -0400 Subject: [PATCH] only preregister in dev --- lib/modules/ens/contracts/ENSRegistry.sol | 2 +- lib/modules/ens/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/modules/ens/contracts/ENSRegistry.sol b/lib/modules/ens/contracts/ENSRegistry.sol index 37917c81f..c843586c0 100644 --- a/lib/modules/ens/contracts/ENSRegistry.sol +++ b/lib/modules/ens/contracts/ENSRegistry.sol @@ -44,7 +44,7 @@ contract ENSRegistry is ENS { * @param owner The address of the new owner. */ function setSubnodeOwner(bytes32 node, bytes32 label, address owner) public only_owner(node, owner) { - var subnode = keccak256(node, label); + var subnode = sha3(node, label); NewOwner(node, label, owner); records[subnode].owner = owner; } diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index ab661d5a9..02259cdd5 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -7,6 +7,7 @@ const reverseAddrSuffix = '.addr.reverse'; class ENS { constructor(embark, _options) { + this.env = embark.env; this.logger = embark.logger; this.events = embark.events; this.namesConfig = embark.config.namesystemConfig; @@ -50,7 +51,7 @@ class ENS { }; self.addSetProvider(config); - if (!self.registration || !self.registration.subdomains || !Object.keys(self.registration.subdomains).length) { + if (!self.env === 'development' || !self.registration || !self.registration.subdomains || !Object.keys(self.registration.subdomains).length) { return cb(); } self.registerConfigDomains(config, cb);