small fix

This commit is contained in:
Ricardo Guilherme Schmidt 2023-06-23 20:03:03 -03:00
parent fc74878977
commit 2f6fe21682
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ contract StakeManager is Ownable {
* @param _vault Referring account
*/
function mintMultiplierPoints(address _vault) external {
Account storage account = accounts[msg.sender];
Account storage account = accounts[_vault];
uint256 lastCall = block.timestamp - account.lastAccured;
uint256 increasedMultiplier = checkMaxMultiplier(
account.balance * (MP_APY * lastCall),
@ -179,7 +179,7 @@ contract StakeManager is Ownable {
accounts[_vault] = _account
; }
function checkMaxMultiplier(uint256 _increasedMultiplier, uint256 _currentMp) private view returns(uint256 _maxToIncrease) {
function checkMaxMultiplier(uint256 _increasedMultiplier, uint256 _currentMp) private pure returns(uint256 _maxToIncrease) {
uint256 newMp = _increasedMultiplier + _currentMp;
return newMp > MAX_MP ? MAX_MP - newMp : _increasedMultiplier;
}