From ddbc4d20586eee08ff50d5885f469ba2557a41a5 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Wed, 28 Aug 2024 09:37:25 -0300 Subject: [PATCH] fix: remove if conditions (OZ H-02) --- .../data-service/utilities/ProvisionManager.sol | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol b/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol index 16f2d6f1e..ef7c9bcf1 100644 --- a/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol +++ b/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol @@ -220,16 +220,12 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa bool _checkPending ) internal view virtual { (uint64 thawingPeriodMin, uint64 thawingPeriodMax) = _getThawingPeriodRange(); - if (thawingPeriodMin != type(uint64).min || thawingPeriodMax != type(uint64).max) { - uint64 thawingPeriodToCheck = _checkPending ? _provision.thawingPeriodPending : _provision.thawingPeriod; - _checkValueInRange(thawingPeriodToCheck, thawingPeriodMin, thawingPeriodMax, "thawingPeriod"); - } + uint64 thawingPeriodToCheck = _checkPending ? _provision.thawingPeriodPending : _provision.thawingPeriod; + _checkValueInRange(thawingPeriodToCheck, thawingPeriodMin, thawingPeriodMax, "thawingPeriod"); (uint32 verifierCutMin, uint32 verifierCutMax) = _getVerifierCutRange(); - if (verifierCutMin != type(uint32).min || verifierCutMax != uint32(PPMMath.MAX_PPM)) { - uint32 maxVerifierCutToCheck = _checkPending ? _provision.maxVerifierCutPending : _provision.maxVerifierCut; - _checkValueInRange(maxVerifierCutToCheck, verifierCutMin, verifierCutMax, "maxVerifierCut"); - } + uint32 maxVerifierCutToCheck = _checkPending ? _provision.maxVerifierCutPending : _provision.maxVerifierCut; + _checkValueInRange(maxVerifierCutToCheck, verifierCutMin, verifierCutMax, "maxVerifierCut"); } // -- getters --