fix(StakeManager): change order of call of mintBonusMP to fix intended behavior.

This commit is contained in:
Ricardo Guilherme Schmidt 2024-09-12 02:35:02 -03:00 committed by r4bbit
parent 0c58dfe241
commit 3e5361f9be
1 changed files with 1 additions and 1 deletions

View File

@ -205,9 +205,9 @@ contract StakeManager is Ownable {
account.lockUntil = block.timestamp + _secondsToLock;
account.epoch = currentEpoch; //starts in current epoch
account.rewardAddress = StakeVault(msg.sender).owner();
_mintBonusMP(account, _secondsToLock, _amount); //TODO: remove this function competely
account.balance = _amount;
account.mpLimitEpoch = mpLimitEpoch;
_mintBonusMP(account, _secondsToLock, _amount);
//update global storage
totalSupplyBalance += _amount;