diff --git a/contracts/protocol/clients/voucher/BosonVoucher.sol b/contracts/protocol/clients/voucher/BosonVoucher.sol index 5b584974a..43959a0d3 100644 --- a/contracts/protocol/clients/voucher/BosonVoucher.sol +++ b/contracts/protocol/clients/voucher/BosonVoucher.sol @@ -115,7 +115,7 @@ contract BosonVoucherBase is IBosonVoucher, BeaconClientBase, OwnableUpgradeable // Revert if exchange id falls within a reserved range uint256 rangeStart = range.start; - require((_tokenId < rangeStart) || (_tokenId >= rangeStart + range.length), EXCHANGE_ID_IN_RESERVED_RANGE); + require(_tokenId < rangeStart || _tokenId >= rangeStart + range.length, EXCHANGE_ID_IN_RESERVED_RANGE); // Issue voucher is called only during commitToOffer (in protocol), so token can be set as committed _committed[_tokenId] = true; @@ -225,7 +225,7 @@ contract BosonVoucherBase is IBosonVoucher, BeaconClientBase, OwnableUpgradeable // Make sure that offer is not expired or voided (Offer memory offer, OfferDates memory offerDates) = getBosonOffer(_offerId); - require(!offer.voided && (block.timestamp <= offerDates.validUntil), OFFER_EXPIRED_OR_VOIDED); + require(!offer.voided && block.timestamp <= offerDates.validUntil, OFFER_EXPIRED_OR_VOIDED); // Get the first token to mint uint256 start = range.start + range.minted; @@ -281,10 +281,10 @@ contract BosonVoucherBase is IBosonVoucher, BeaconClientBase, OwnableUpgradeable // Make sure that offer is either expired or voided (Offer memory offer, OfferDates memory offerDates) = getBosonOffer(_offerId); - require(offer.voided || (block.timestamp > offerDates.validUntil), OFFER_STILL_VALID); + require(offer.voided || block.timestamp > offerDates.validUntil, OFFER_STILL_VALID); // Get the first token to burn - uint256 start = (range.lastBurnedTokenId == 0) ? range.start : (range.lastBurnedTokenId + 1); + uint256 start = range.lastBurnedTokenId == 0 ? range.start : range.lastBurnedTokenId + 1; // Get the last token to burn uint256 end = start + _amount; @@ -319,7 +319,7 @@ contract BosonVoucherBase is IBosonVoucher, BeaconClientBase, OwnableUpgradeable function getAvailablePreMints(uint256 _offerId) external view returns (uint256 count) { // If offer is expired or voided, return 0 (Offer memory offer, OfferDates memory offerDates) = getBosonOffer(_offerId); - if (offer.voided || (block.timestamp > offerDates.validUntil)) { + if (offer.voided || block.timestamp > offerDates.validUntil) { return 0; } diff --git a/contracts/protocol/facets/ExchangeHandlerFacet.sol b/contracts/protocol/facets/ExchangeHandlerFacet.sol index 811c2e943..2e2217824 100644 --- a/contracts/protocol/facets/ExchangeHandlerFacet.sol +++ b/contracts/protocol/facets/ExchangeHandlerFacet.sol @@ -1072,7 +1072,7 @@ contract ExchangeHandlerFacet is IBosonExchangeHandler, BuyerBase, DisputeBase { return IERC1155(_condition.tokenAddress).balanceOf(_buyer, _tokenId) >= _condition.threshold; } else { // no need to check if is NonFungible token there is no way to create a SpecifiedToken condition with a Fungible token - return (IERC721(_condition.tokenAddress).ownerOf(_tokenId) == _buyer); + return IERC721(_condition.tokenAddress).ownerOf(_tokenId) == _buyer; } } diff --git a/contracts/protocol/facets/PauseHandlerFacet.sol b/contracts/protocol/facets/PauseHandlerFacet.sol index 207fb113e..523327a93 100644 --- a/contracts/protocol/facets/PauseHandlerFacet.sol +++ b/contracts/protocol/facets/PauseHandlerFacet.sol @@ -84,7 +84,7 @@ contract PauseHandlerFacet is ProtocolBase, IBosonPauseHandler { for (uint256 i = 0; i < totalRegions; i++) { // Check if the region is paused by bitwise AND operation with shifted 1 - if ((status.pauseScenario & (1 << i)) != 0) { + if (status.pauseScenario & (1 << i) != 0) { regions[count] = BosonTypes.PausableRegion(i); count++;