Skip to content

Commit 632575b

Browse files
authored
fix: Uniswap v2 liquidity token price (#608)
1 parent d8ed2aa commit 632575b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/calleeFunctions/helpers/uniswapV2.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import { getCollateralConfigBySymbol } from '../../constants/COLLATERALS';
1717

1818
const EXCHANGE_RATE_CACHE = 20 * 1000;
1919

20-
const getCalleeConfig = function (collateral: CollateralConfig, marketId: string): RegularCalleeConfig {
21-
const marketData = collateral.exchanges[marketId];
20+
const getCalleeConfig = function (collateral: CollateralConfig, _marketId: string): RegularCalleeConfig {
21+
// TODO: remove _marketId from the all uniswapV2 functions, since they have to always use 'Uniswap V2' config
22+
const marketData = collateral.exchanges['Uniswap V2'];
2223
const isUniswapTokenNonAutoRouted =
2324
(marketData?.callee === 'UniswapV2CalleeDai' || marketData?.callee === 'UniswapV3Callee') &&
2425
!('automaticRouter' in marketData);

0 commit comments

Comments
 (0)