mirror of
https://github.com/status-im/ens-usernames.git
synced 2025-01-21 00:00:47 +00:00
prevent reentracy from registerUser to slashUsername
This commit is contained in:
parent
c81f6d405e
commit
bc239bad70
@ -605,7 +605,7 @@ contract UsernameRegistrar is Controlled, ApproveAndCallFallBack {
|
||||
emit UsernameOwner(namehash, _owner);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @dev Removes account hash of `_username` and send account.balance to msg.sender.
|
||||
* @param _username Username being slashed.
|
||||
*/
|
||||
@ -620,6 +620,7 @@ contract UsernameRegistrar is Controlled, ApproveAndCallFallBack {
|
||||
"Nothing to slash."
|
||||
);
|
||||
} else {
|
||||
assert(accounts[label].creationTime != block.timestamp);
|
||||
amountToTransfer = accounts[label].balance;
|
||||
delete accounts[label];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user