Skip to content

Commit

Permalink
remove wrong line
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCardinalError committed Jul 12, 2024
1 parent 8aad41a commit dae4e65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ contract StakeRegistry is AccessControl, Pausable {

if (_surplusStake > 0) {
stakes[msg.sender].potentialStake -= _surplusStake;
stakes[msg.sender].committedStake -= _surplusStake / OracleContract.currentPrice();
if (!ERC20(bzzToken).transfer(msg.sender, _surplusStake)) revert TransferFailed();
emit StakeWithdrawn(msg.sender, _surplusStake);
}

console.log(stakes[msg.sender].potentialStake);
console.log(_surplusStake);
console.log(stakes[msg.sender].committedStake * OracleContract.currentPrice());
console.log(calculateEffectiveStake(stakes[msg.sender].committedStake, stakes[msg.sender].potentialStake));
}
Expand Down

0 comments on commit dae4e65

Please sign in to comment.