add check in moveRegistry

This commit is contained in:
Ricardo Guilherme Schmidt 2020-09-18 10:26:59 -03:00
parent b0e75e853b
commit c8a92c4c57
No known key found for this signature in database
GPG Key ID: 1FD1630B93893608

View File

@ -291,6 +291,7 @@ contract UsernameRegistrar is Controlled, ApproveAndCallFallBack {
function moveRegistry()
external
{
require(state == RegistrarState.Active, "Cannot update state of an non active registrar.")
require(ensRegistry.owner(ensNode) != address(this), "Cannot move to self.");
setState(RegistrarState.Moved);
emit RegistryMoved(_newRegistry);