Skip to content

Commit

Permalink
Fix getTwap vars
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaman1337 committed Aug 7, 2024
1 parent f922dca commit a4e89ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion protocol/contracts/libraries/Oracle/LibUniswapOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ library LibUniswapOracle {
(bool success, int24 tick) = consult(pool, lookback);
if (!success) return 0;

price = LibUniswapOracleLibrary.getQuoteAtTick(tick, oneToken, token1, token2);
price = LibUniswapOracleLibrary.getQuoteAtTick(
tick,
baseTokenAmount,
baseToken,
quoteToken
);

uint256 baseTokenDecimals = IERC20Decimals(baseToken).decimals();
uint256 quoteTokenDecimals = IERC20Decimals(quoteToken).decimals();
Expand Down

0 comments on commit a4e89ac

Please sign in to comment.