mirror of
https://github.com/status-im/ens-usernames.git
synced 2025-03-01 18:40:34 +00:00
add message for failed assert in function addDomain
This commit is contained in:
parent
a4ab4207d2
commit
6b2e95edea
@ -69,5 +69,4 @@ const AddDomain = withFormik({
|
|||||||
}
|
}
|
||||||
})(InnerForm)
|
})(InnerForm)
|
||||||
|
|
||||||
setTimeout(() => {ENSSubdomainRegistry.methods.controller().call().then(console.log)}, 2000)
|
|
||||||
export default AddDomain;
|
export default AddDomain;
|
||||||
|
@ -262,8 +262,8 @@ contract ENSSubdomainRegistry is Controlled {
|
|||||||
external
|
external
|
||||||
onlyController
|
onlyController
|
||||||
{
|
{
|
||||||
require(domains[_domain].state == NodeState.Free);
|
require(domains[_domain].state == NodeState.Free, "Domain state is not free");
|
||||||
require(ens.owner(_domain) == address(this));
|
require(ens.owner(_domain) == address(this), "Registry does not own domain");
|
||||||
domains[_domain] = Domain(NodeState.Owned, _price);
|
domains[_domain] = Domain(NodeState.Owned, _price);
|
||||||
emit DomainPrice(_domain, _price);
|
emit DomainPrice(_domain, _price);
|
||||||
}
|
}
|
||||||
@ -331,4 +331,4 @@ contract ENSSubdomainRegistry is Controlled {
|
|||||||
creationTime = accounts[_subdomainHash].creationTime;
|
creationTime = accounts[_subdomainHash].creationTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user