From 4f63d17eb115abb92313b2b23d7731440bb8d281 Mon Sep 17 00:00:00 2001 From: hueso Date: Thu, 29 Feb 2024 20:09:54 -0300 Subject: [PATCH] set deposit() nonReentrant --- contracts/p2pix.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/p2pix.sol b/contracts/p2pix.sol index 235047f..414b4c2 100644 --- a/contracts/p2pix.sol +++ b/contracts/p2pix.sol @@ -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); }