Fix oracle warning for BONK

This commit is contained in:
Riordan Panayides 2023-04-27 19:01:52 +01:00
parent 8fb5c17d92
commit 24b2b406b7
1 changed files with 3 additions and 2 deletions

View File

@ -102,10 +102,11 @@ const OraclePrice = () => {
oracleWriteSlot,
accountSlot
)
const maxStalenessSlots = marketOrBank.oracleConfig.maxStalenessSlots.toNumber()
setHighestSlot(highestSlot)
setIsStale(
highestSlot - lastUpdatedSlot >
marketOrBank.oracleConfig.maxStalenessSlots.toNumber()
maxStalenessSlots > 0 &&
highestSlot - lastUpdatedSlot > maxStalenessSlots
)
if (selectedMarket instanceof PerpMarket) {