This commit is contained in:
zhl 2022-01-27 17:05:46 +08:00
parent b636dba965
commit d9f7889e06
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O
override override
returns (bool) returns (bool)
{ {
if (approvalWhitelists[operator] == true) { if (approvalWhitelists[operator]) {
return true; return true;
} }
@ -59,7 +59,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O
* @dev Allow operation to reduce gas fee. * @dev Allow operation to reduce gas fee.
*/ */
function addApprovalWhitelist(address proxy) public onlyOwner { function addApprovalWhitelist(address proxy) public onlyOwner {
require(approvalWhitelists[proxy] == false, "Invalid proxy address"); require(!approvalWhitelists[proxy], "Invalid proxy address");
approvalWhitelists[proxy] = true; approvalWhitelists[proxy] = true;
} }

View File

@ -47,7 +47,7 @@ contract Marketplace is Ownable, HasSignature {
onlyOwner onlyOwner
{ {
for (uint256 i = 0; i < _paymentTokens.length; i++) { for (uint256 i = 0; i < _paymentTokens.length; i++) {
if (paymentTokens[_paymentTokens[i]] == true) { if (paymentTokens[_paymentTokens[i]]) {
continue; continue;
} }
@ -98,7 +98,7 @@ contract Marketplace is Ownable, HasSignature {
// uint256[3] [token_id,price,salt_nonce] // uint256[3] [token_id,price,salt_nonce]
// bytes seller_signature // bytes seller_signature
require( require(
paymentTokens[addresses[2]] == true, paymentTokens[addresses[2]],
"Marketplace: invalid payment method" "Marketplace: invalid payment method"
); );