@@ -246,19 +246,19 @@ func (eng *DebtEngine) createTvlSnapshots(blockNum int64, marketToTvl MarketToTv
246246 //
247247 underlyingToken := state .(* schemas.PoolState ).UnderlyingToken
248248 //
249- latestOracle , version , err := eng .repo .GetActivePriceOracleByBlockNum (blockNum )
250- log .CheckFatal (err )
249+ // latestOracle, version, err := eng.repo.GetActivePriceOracleByBlockNum(blockNum)
250+ // log.CheckFatal(err)
251251 //
252252 fn := func (amount * core.BigInt ) float64 {
253253 if amount .String () == "0" {
254254 return 0
255255 }
256256 return utils .GetFloat64Decimal (
257257 eng .GetPriceForTvl (
258- latestOracle ,
258+ schemas . PriceOracleT ( "" ) ,
259259 state .(* schemas.PoolState ).PriceOracle ,
260260 underlyingToken ,
261- amount .Convert (), version ), 8 )
261+ amount .Convert (), state .( * schemas. PoolState ). Version ), 8 )
262262 }
263263 availLiq := fn (entry .AvailableLiquidityBI )
264264 expectedLiqInUSD := fn (entry .ExpectedLiqBI )
@@ -546,7 +546,7 @@ func (eng *DebtEngine) CalculateSessionDebt(blockNum int64, session *schemas.Cre
546546}
547547
548548// helper methods
549- func (eng * DebtEngine ) GetPriceForTvl (_po schemas.PriceOracleT , poolPriceOracleT schemas.PriceOracleT , tokenAddr string , amount * big.Int , version core.VersionType ) * big.Int {
549+ func (eng * DebtEngine ) GetPriceForTvl (_ schemas.PriceOracleT , poolPriceOracleT schemas.PriceOracleT , tokenAddr string , amount * big.Int , version core.VersionType ) * big.Int {
550550 priceOracle := poolPriceOracleT
551551 tokenPrice := eng .priceHandler .GetTokenLastPF (priceOracle , tokenAddr , version )
552552 tokenDecimals := eng .repo .GetToken (tokenAddr ).Decimals
0 commit comments