Skip to content

Commit

Permalink
little change
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Jun 20, 2024
1 parent d6d42d5 commit aa20764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collator/NominationPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ contract NominationPool {

function stake(address account, uint256 amount) external onlyHub updateReward(account) {
require(amount > 0, "Cannot stake 0");
_totalSupply = _totalSupply + amount;
_totalSupply += amount;
_balances[account] += amount;
emit Staked(account, amount);
}

function withdraw(address account, uint256 amount) public onlyHub updateReward(account) {
require(amount > 0, "Cannot withdraw 0");
_totalSupply = _totalSupply - amount;
_totalSupply -= amount;
_balances[account] -= amount;
emit Withdrawn(account, amount);
}
Expand Down

0 comments on commit aa20764

Please sign in to comment.