set deposit() nonReentrant
This commit is contained in:
parent
d27bdda15e
commit
4f63d17eb1
@ -57,7 +57,7 @@ contract P2PIX is BaseUtils {
|
||||
ERC20 token,
|
||||
uint96 amount,
|
||||
bool valid
|
||||
) public {
|
||||
) public nonReentrant {
|
||||
|
||||
if (bytes(pixTarget).length == 0) revert EmptyPixTarget();
|
||||
if (!allowedERC20s(token)) revert TokenDenied();
|
||||
@ -68,8 +68,6 @@ contract P2PIX is BaseUtils {
|
||||
if (_newBal > MAXBALANCE_UPPERBOUND)
|
||||
revert MaxBalExceeded();
|
||||
|
||||
setReentrancyGuard();
|
||||
|
||||
if (allowlistRoot != 0) {
|
||||
setRoot(msg.sender, allowlistRoot);
|
||||
}
|
||||
@ -91,8 +89,6 @@ contract P2PIX is BaseUtils {
|
||||
amount
|
||||
);
|
||||
|
||||
clearReentrancyGuard();
|
||||
|
||||
emit DepositAdded(msg.sender, token, amount);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user