Skip to content

Commit

Permalink
Code423n4 #83, incorrect assert statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Splidge committed Jun 21, 2021
1 parent 7571199 commit 4224160
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/RCMarket.sol
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ contract RCMarket is Initializable, NativeMetaTransaction, IRCMarket {
);
uint256 _tokenId = _cardId + totalNftMintCount;

assert(nfthub.transferNft(_from, _to, _tokenId));
nfthub.transferNft(_from, _to, _tokenId);
emit LogNewOwner(_cardId, _to);
}

Expand Down Expand Up @@ -567,7 +567,7 @@ contract RCMarket is Initializable, NativeMetaTransaction, IRCMarket {

/// @notice all payouts happen through here
function _payout(address _recipient, uint256 _amount) internal {
assert(treasury.payout(_recipient, _amount));
treasury.payout(_recipient, _amount);
}

/// @dev the below functions pay stakeholders (artist, creator, affiliate, card specific affiliates)
Expand Down Expand Up @@ -754,7 +754,7 @@ contract RCMarket is Initializable, NativeMetaTransaction, IRCMarket {
_startingPosition
);

assert(treasury.updateLastRentalTime(_user));
treasury.updateLastRentalTime(_user);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion contracts/RCTreasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ contract RCTreasury is Ownable, NativeMetaTransaction, IRCTreasury {
returns (bool)
{
require(!globalPause, "Payouts are disabled");
assert(marketPot[msgSender()] >= _amount);
user[_user].deposit += SafeCast.toUint128(_amount);
marketPot[msgSender()] -= _amount;
totalMarketPots -= _amount;
Expand Down

0 comments on commit 4224160

Please sign in to comment.