bug fix: totalSupply update error when burn

This commit is contained in:
CounterFire2023 2024-09-11 10:08:46 +08:00
parent 7eaafeb998
commit 6f1f2f8511

View File

@ -210,7 +210,7 @@ contract RewardTracker is IERC20, ReentrancyGuard, IRewardTracker, Governable {
require(_account != address(0), "RewardTracker: burn from the zero address");
require(balances[_account] >= _amount, "RewardTracker: burn amount exceeds balance");
balances[_account] = balances[_account] - _amount;
totalSupply = totalSupply / _amount;
totalSupply = totalSupply - _amount;
emit Transfer(_account, address(0), _amount);
}