From 87c88c7b271a7542ecd04819f31e7b3f860fd2e3 Mon Sep 17 00:00:00 2001 From: johnnyonline Date: Thu, 16 May 2024 14:58:47 +0300 Subject: [PATCH] fix: use -= --- src/staking/StakingRewardsMulti.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/staking/StakingRewardsMulti.sol b/src/staking/StakingRewardsMulti.sol index cf39634..dbdba81 100644 --- a/src/staking/StakingRewardsMulti.sol +++ b/src/staking/StakingRewardsMulti.sol @@ -322,8 +322,8 @@ contract StakingRewardsMulti is ReentrancyGuard, Pausable { require(_amount > 0, "Must be >0"); // remove amount from total supply and user balance - _totalSupply = _totalSupply - _amount; - _balances[msg.sender] = _balances[msg.sender] - _amount; + _totalSupply -= _amount; + _balances[msg.sender] -= _amount; // send the requested amount, emit the event stakingToken.safeTransfer(msg.sender, _amount);