From d9f7889e06b2f3ec3efd04c121d2d091fb786780 Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 27 Jan 2022 17:05:46 +0800 Subject: [PATCH] CEB-02 --- contracts/BEBase.sol | 4 ++-- contracts/MarketPlace.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/BEBase.sol b/contracts/BEBase.sol index 1303392..749451d 100644 --- a/contracts/BEBase.sol +++ b/contracts/BEBase.sol @@ -48,7 +48,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O override returns (bool) { - if (approvalWhitelists[operator] == true) { + if (approvalWhitelists[operator]) { return true; } @@ -59,7 +59,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O * @dev Allow operation to reduce gas fee. */ function addApprovalWhitelist(address proxy) public onlyOwner { - require(approvalWhitelists[proxy] == false, "Invalid proxy address"); + require(!approvalWhitelists[proxy], "Invalid proxy address"); approvalWhitelists[proxy] = true; } diff --git a/contracts/MarketPlace.sol b/contracts/MarketPlace.sol index cb115dc..6f4f7dc 100644 --- a/contracts/MarketPlace.sol +++ b/contracts/MarketPlace.sol @@ -47,7 +47,7 @@ contract Marketplace is Ownable, HasSignature { onlyOwner { for (uint256 i = 0; i < _paymentTokens.length; i++) { - if (paymentTokens[_paymentTokens[i]] == true) { + if (paymentTokens[_paymentTokens[i]]) { continue; } @@ -98,7 +98,7 @@ contract Marketplace is Ownable, HasSignature { // uint256[3] [token_id,price,salt_nonce] // bytes seller_signature require( - paymentTokens[addresses[2]] == true, + paymentTokens[addresses[2]], "Marketplace: invalid payment method" );