Skip to content

Commit

Permalink
Revert condition on node deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
kanewallmann committed Feb 26, 2024
1 parent bcd5f0d commit ab2f928
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/contract/node/RocketNodeDeposit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface, RocketVaul
// Emit deposit received event
emit DepositReceived(msg.sender, msg.value, block.timestamp);
// Increase ETH matched (used to calculate RPL collateral requirements)
_increaseEthMatched(msg.sender, launchAmount- _bondAmount);
_increaseEthMatched(msg.sender, launchAmount - _bondAmount);
// Create the minipool
RocketMinipoolInterface minipool = createMinipool(_salt, _expectedMinipoolAddress);
// Process node deposit
Expand Down Expand Up @@ -231,9 +231,7 @@ contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface, RocketVaul
}
uint256 remaining = address(this).balance - _preLaunchValue;
// Deposit the left over value into the deposit pool
if (remaining > 0) {
rocketDepositPool.nodeDeposit{value: remaining}(_bondAmount - _preLaunchValue);
}
rocketDepositPool.nodeDeposit{value: remaining}(_bondAmount - _preLaunchValue);
}

/// @notice Creates a "vacant" minipool which a node operator can use to migrate a validator with a BLS withdrawal credential
Expand Down

0 comments on commit ab2f928

Please sign in to comment.