From a43c1ddf52cf1191ccf1e71a637df02d78b98cc0 Mon Sep 17 00:00:00 2001 From: Nazzareno Massari Date: Thu, 10 Dec 2020 15:04:16 +0000 Subject: [PATCH] fix reclaimToken reentrancy, detected via slither --- contracts/WFILFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/WFILFactory.sol b/contracts/WFILFactory.sol index 3a13184..6beca52 100644 --- a/contracts/WFILFactory.sol +++ b/contracts/WFILFactory.sol @@ -363,8 +363,8 @@ contract WFILFactory is AccessControl, Pausable { require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "WFILFactory: caller is not the default admin"); require(recipient != address(0), "WFILFactory: recipient is the zero address"); uint256 balance = token.balanceOf(address(this)); - token.safeTransfer(recipient, balance); emit TokenClaimed(token, recipient, balance); + token.safeTransfer(recipient, balance); }