Skip to content

Commit

Permalink
Remove unused function and fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
RickGriff committed Jan 20, 2025
1 parent f591ee5 commit 4a5c943
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions contracts/src/PriceFeeds/RETHPriceFeed.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract RETHPriceFeed is CompositePriceFeed, IRETHPriceFeed {
assert(priceSource == PriceSource.primary);
(uint256 ethUsdPrice, bool ethUsdOracleDown) = _getOracleAnswer(ethUsdOracle);
(uint256 rEthEthPrice, bool rEthEthOracleDown) = _getOracleAnswer(rEthEthOracle);
(uint256 rEthPerEth, bool exchangeRateIsDown) = _getCanonicalRate();
(uint256 ethPerReth, bool exchangeRateIsDown) = _getCanonicalRate();

// If either the ETH-USD feed or exchange rate is down, shut down and switch to the last good price
// seen by the system since we need both for primary and fallback price calcs
Expand All @@ -57,7 +57,7 @@ contract RETHPriceFeed is CompositePriceFeed, IRETHPriceFeed {
uint256 rEthUsdMarketPrice = ethUsdPrice * rEthEthPrice / 1e18;

// Calculate the canonical LST-USD price: USD_per_RETH = USD_per_ETH * ETH_per_RETH
uint256 rEthUsdCanonicalPrice = ethUsdPrice * rEthPerEth / 1e18;
uint256 rEthUsdCanonicalPrice = ethUsdPrice * ethPerReth / 1e18;

uint256 rEthUsdPrice;

Expand Down
4 changes: 0 additions & 4 deletions contracts/src/PriceFeeds/WETHPriceFeed.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ contract WETHPriceFeed is MainnetPriceFeedBase {
// _fetchPricePrimary returns:
// - The price
// - A bool indicating whether a new oracle failure was detected in the call
function _fetchPricePrimary(bool /* _isRedemption */ ) internal virtual returns (uint256, bool) {
return _fetchPricePrimary();
}

function _fetchPricePrimary() internal returns (uint256, bool) {
assert(priceSource == PriceSource.primary);
(uint256 ethUsdPrice, bool ethUsdOracleDown) = _getOracleAnswer(ethUsdOracle);
Expand Down

0 comments on commit 4a5c943

Please sign in to comment.