Skip to content

Commit

Permalink
comparison change
Browse files Browse the repository at this point in the history
  • Loading branch information
ihoroleksiienko committed Jul 3, 2024
1 parent 1692b77 commit ba170a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions contracts/base/CWToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,9 @@ contract CWToken is
if (balanceTotal < balanceFrozen + balancePreminted + balanceRestricted) {
uint256 balanceFreezable = (balanceTotal >= balancePreminted) ? balanceTotal - balancePreminted : 0;

if (balancePreminted != 0 && balanceTotal < balancePreminted) {
if (balanceTotal < balancePreminted) {
revert TransferExceededPremintedAmount();
} else if (balanceFrozen != 0 &&
msg.sig != this.transferFrozen.selector &&
balanceFreezable < balanceFrozen
) {
} else if (balanceFreezable < balanceFrozen && msg.sig != this.transferFrozen.selector) {
revert TransferExceededFrozenAmount();
} else if (balanceRestricted != 0) {
revert TransferExceededRestrictedAmount();
Expand Down

0 comments on commit ba170a1

Please sign in to comment.