mirror of https://github.com/embarklabs/embark.git
only preregister in dev
This commit is contained in:
parent
bb9f058b15
commit
c3ea2ff160
|
@ -44,7 +44,7 @@ contract ENSRegistry is ENS {
|
||||||
* @param owner The address of the new owner.
|
* @param owner The address of the new owner.
|
||||||
*/
|
*/
|
||||||
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) public only_owner(node, 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);
|
NewOwner(node, label, owner);
|
||||||
records[subnode].owner = owner;
|
records[subnode].owner = owner;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ const reverseAddrSuffix = '.addr.reverse';
|
||||||
|
|
||||||
class ENS {
|
class ENS {
|
||||||
constructor(embark, _options) {
|
constructor(embark, _options) {
|
||||||
|
this.env = embark.env;
|
||||||
this.logger = embark.logger;
|
this.logger = embark.logger;
|
||||||
this.events = embark.events;
|
this.events = embark.events;
|
||||||
this.namesConfig = embark.config.namesystemConfig;
|
this.namesConfig = embark.config.namesystemConfig;
|
||||||
|
@ -50,7 +51,7 @@ class ENS {
|
||||||
};
|
};
|
||||||
self.addSetProvider(config);
|
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();
|
return cb();
|
||||||
}
|
}
|
||||||
self.registerConfigDomains(config, cb);
|
self.registerConfigDomains(config, cb);
|
||||||
|
|
Loading…
Reference in New Issue