File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/mainnet/processors/protocol Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,9 @@ const getOTokenDetails = async (
218218 )
219219 const woethBalance = superOETHbWrappedOETH ?. balanceETH ?? 0n
220220 detail . bridgedTvl = woethBalance
221- detail . revenue += ( ( detailOETH ?. revenue ?? 0n ) * woethBalance ) / detail . tvl
221+ if ( detail . tvl !== 0n ) {
222+ detail . revenue += ( ( detailOETH ?. revenue ?? 0n ) * woethBalance ) / detail . tvl
223+ }
222224 } else if ( detail . product === 'superOETHp' ) {
223225 const detailOETH = await getProtocolDailyStatDetail ( ctx , date , 'OETH' )
224226 const superOETHpWrappedOETH = await getLatestStrategyBalance (
@@ -228,7 +230,9 @@ const getOTokenDetails = async (
228230 )
229231 const woethBalance = superOETHpWrappedOETH ?. balanceETH ?? 0n
230232 detail . bridgedTvl = woethBalance
231- detail . revenue += ( ( detailOETH ?. revenue ?? 0n ) * woethBalance ) / detail . tvl
233+ if ( detail . tvl !== 0n ) {
234+ detail . revenue += ( ( detailOETH ?. revenue ?? 0n ) * woethBalance ) / detail . tvl
235+ }
232236 }
233237
234238 details . push ( detail )
You can’t perform that action at this time.
0 commit comments