Skip to content

Commit 69fa1bc

Browse files
authored
Remove unncessary if statement (#24)
1 parent 252d1fa commit 69fa1bc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/meta/MetaPaymaster.sol

+1-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ contract MetaPaymaster is OwnableUpgradeable {
7575
* @param amount The amount to set the balance to.
7676
*/
7777
function setBalance(address account, uint256 amount) public onlyOwner {
78-
if (amount > balanceOf[account]) {
79-
total += amount - balanceOf[account];
80-
} else {
81-
total -= balanceOf[account] - amount;
82-
}
78+
total = total + amount - balanceOf[account];
8379
balanceOf[account] = amount;
8480
}
8581

0 commit comments

Comments
 (0)