Skip to content

Commit

Permalink
contract revert -> require
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Sep 10, 2024
1 parent 47c7d67 commit 984adc9
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 82 deletions.
4 changes: 1 addition & 3 deletions contracts/TokenAgentFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,7 @@ contract TokenAgent is TokenInfo, Owned, NonReentrancy {
} else if (takerToOwnerTotal > ownerToTakerTotal){
uint diff = takerToOwnerTotal - ownerToTakerTotal;
if (paymentsInEth) {
if (diff > totalEth) {
revert InsufficentEthersRemaining(diff, totalEth);
}
require(diff <= totalEth, InsufficentEthersRemaining(diff, totalEth));
totalEth -= diff;
emit InternalTransfer(address(this), address(weth), diff, Unixtime.wrap(uint40(block.timestamp)));
weth.deposit{value: diff}();
Expand Down
Loading

0 comments on commit 984adc9

Please sign in to comment.