only preregister in dev

This commit is contained in:
Jonathan Rainville 2018-07-25 16:21:00 -04:00 committed by Iuri Matias
parent bb9f058b15
commit c3ea2ff160
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);