Skip to content

Commit

Permalink
Lint complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
jar-o committed Jul 30, 2024
1 parent 8cb11d0 commit 395f72c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions test/integration/AggorIntegration_eth_ETH_USD.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,15 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {

function test_TwapScaleUp() public {
uint price = wrapper.readOracle(
uniswapPool, uniswapBaseToken, uniswapQuoteToken, uniswapBaseDec, uniswapLookback
uniswapPool,
uniswapBaseToken,
uniswapQuoteToken,
uniswapBaseDec,
uniswapLookback
);

// Scale price up from USDC.decimals()
uint128 wantVal = uint128(price * 10 ** (/*aggor.decimals()*/ 8 - 6));
uint128 wantVal = uint128(price * 10 ** (8 - 6));
assertTrue(wantVal > price);

// Make TWAP value the median.
Expand All @@ -405,14 +409,18 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {

// Read aggor.
uint gotVal;
(gotVal, , ) = aggor.readWithStatus();
(gotVal,,) = aggor.readWithStatus();
assertEq(gotVal, wantVal);
}

// Note we reverse the default base/quote for this test
function test_TwapScaleDown() public {
uint price = wrapper.readOracle(
uniswapPool, uniswapQuoteToken, uniswapBaseToken, uniswapQuoteDec, uniswapLookback
uniswapPool,
uniswapQuoteToken,
uniswapBaseToken,
uniswapQuoteDec,
uniswapLookback
);

// Scale price down from WETH.decimals()
Expand Down Expand Up @@ -453,7 +461,7 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {

// Read aggor.
uint gotVal;
(gotVal, , ) = aggor.readWithStatus();
(gotVal,,) = aggor.readWithStatus();
assertEq(gotVal, wantVal);
}
}
Expand Down

0 comments on commit 395f72c

Please sign in to comment.