Skip to content

Commit

Permalink
Remove unncessary if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Dec 20, 2023
1 parent 252d1fa commit 93b47aa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/meta/MetaPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ contract MetaPaymaster is OwnableUpgradeable {
* @param amount The amount to set the balance to.
*/
function setBalance(address account, uint256 amount) public onlyOwner {
if (amount > balanceOf[account]) {
total += amount - balanceOf[account];
} else {
total -= balanceOf[account] - amount;
}
total = total + amount - balanceOf[account];
balanceOf[account] = amount;
}

Expand Down

0 comments on commit 93b47aa

Please sign in to comment.