Skip to content

Commit

Permalink
Avoid allocate when amount is 0 (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
nz-neooo authored Jul 18, 2024
1 parent 9d7b544 commit 3699a44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/StakingAllocation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ contract StakingAllocation is IStakingAllocation, Initializable, OwnableUpgradea
require(msg.sender == settings.getContractAddress(SQContracts.ProjectRegistry), 'SAL06');
uint256 amount = allocatedTokens[_runner][_deployment];

_removeAllocation(_deployment, _runner, amount);
if (amount > 0) {
_removeAllocation(_deployment, _runner, amount);
}
}

function _removeAllocation(bytes32 _deployment, address _runner, uint256 _amount) private {
Expand Down

0 comments on commit 3699a44

Please sign in to comment.