add message for failed assert in function addDomain

This commit is contained in:
Barry Gitarts 2018-05-23 15:52:30 -04:00
parent a4ab4207d2
commit 6b2e95edea
2 changed files with 3 additions and 4 deletions

View File

@ -69,5 +69,4 @@ const AddDomain = withFormik({
}
})(InnerForm)
setTimeout(() => {ENSSubdomainRegistry.methods.controller().call().then(console.log)}, 2000)
export default AddDomain;

View File

@ -262,8 +262,8 @@ contract ENSSubdomainRegistry is Controlled {
external
onlyController
{
require(domains[_domain].state == NodeState.Free);
require(ens.owner(_domain) == address(this));
require(domains[_domain].state == NodeState.Free, "Domain state is not free");
require(ens.owner(_domain) == address(this), "Registry does not own domain");
domains[_domain] = Domain(NodeState.Owned, _price);
emit DomainPrice(_domain, _price);
}