Skip to content

Commit

Permalink
fix [L-02 Redundant code block]
Browse files Browse the repository at this point in the history
  • Loading branch information
seongyun-ko committed Sep 4, 2024
1 parent 4ddd751 commit 66f3c43
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/StakingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,6 @@ contract StakingManager is
// Call function in auction contract to re-initiate the bid that won
auctionManager.reEnterAuction(_validatorId);

bool isFullStake = (msg.sender != liquidityPoolContract);
if (isFullStake) {
_refundDeposit(msg.sender, stakeAmount);
}

emit DepositCancelled(_validatorId);
}

Expand Down
24 changes: 24 additions & 0 deletions src/eBtcRateProvider.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IRateProvider {
function getRate() external view returns (uint256);
function getRateSafe() external view returns (uint256 rate);
function decimals() external view returns (uint8);
}

contract eBtcRateProvider is IRateProvider {
IRateProvider public rateProvier = IRateProvider(0x1b293DC39F94157fA0D1D36d7e0090C8B8B8c13F);

function getRate() external view returns (uint256) {
return rateProvier.getRate() * 1e10;
}

function getRateSafe() external view returns (uint256 rate) {
return rateProvier.getRateSafe() * 1e10;
}

function decimals() external view returns (uint8) {
return rateProvier.decimals() + 10;
}
}

0 comments on commit 66f3c43

Please sign in to comment.