From cdab0488091476d62743b334a7182c0ecffc770e Mon Sep 17 00:00:00 2001 From: ZrowGz Date: Wed, 8 Mar 2023 13:01:27 -0800 Subject: [PATCH] Macro Fix Q-18 remove bool comparison --- src/hardhat/contracts/Staking/FraxUnifiedFarmTemplate_V2.sol | 4 ++-- src/hardhat/contracts/Staking/FraxUnifiedFarm_ERC20_V2.sol | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hardhat/contracts/Staking/FraxUnifiedFarmTemplate_V2.sol b/src/hardhat/contracts/Staking/FraxUnifiedFarmTemplate_V2.sol index c1728d74..b1228e9d 100755 --- a/src/hardhat/contracts/Staking/FraxUnifiedFarmTemplate_V2.sol +++ b/src/hardhat/contracts/Staking/FraxUnifiedFarmTemplate_V2.sol @@ -572,7 +572,7 @@ contract FraxUnifiedFarmTemplate_V2 is OwnedV2, ReentrancyGuardV2 { /// @notice A function that can be overridden to add extra logic to the getReward function /// @param destination_address The address to send the rewards to function getRewardExtraLogic(address destination_address) public nonReentrant { - if(rewardsCollectionPaused == true) revert RewardsCollectionPaused(); + if(rewardsCollectionPaused) revert RewardsCollectionPaused(); return _getRewardExtraLogic(msg.sender, destination_address); } @@ -616,7 +616,7 @@ contract FraxUnifiedFarmTemplate_V2 is OwnedV2, ReentrancyGuardV2 { lastRewardClaimTime[rewardee] = block.timestamp; // Make sure rewards collection isn't paused - if(rewardsCollectionPaused == true) revert RewardsCollectionPaused(); + if(rewardsCollectionPaused) revert RewardsCollectionPaused(); // Update the rewards array and distribute rewards rewards_before = new uint256[](rewardTokens.length); diff --git a/src/hardhat/contracts/Staking/FraxUnifiedFarm_ERC20_V2.sol b/src/hardhat/contracts/Staking/FraxUnifiedFarm_ERC20_V2.sol index a9bd389b..5226287f 100644 --- a/src/hardhat/contracts/Staking/FraxUnifiedFarm_ERC20_V2.sol +++ b/src/hardhat/contracts/Staking/FraxUnifiedFarm_ERC20_V2.sol @@ -682,7 +682,7 @@ contract FraxUnifiedFarm_ERC20_V2 is FraxUnifiedFarmTemplate_V2 { /// @param destination_address The address to send the withdrawn liquidity to. /// @return The amount of liquidity withdrawn. function withdrawLocked(uint256 theArrayIndex, address destination_address) nonReentrant external returns (uint256) { - if (withdrawalsPaused == true) revert WithdrawalsPaused(); + if (withdrawalsPaused) revert WithdrawalsPaused(); return _withdrawLocked(msg.sender, destination_address, theArrayIndex); }