Skip to content

Commit

Permalink
chore: Remove unused unset cache
Browse files Browse the repository at this point in the history
  • Loading branch information
memoyil committed Oct 3, 2024
1 parent f0fac89 commit 7b51da5
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions apps/web/src/state/farmsV4/state/poolApr/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,7 @@ const calcV2PoolApr = ({
}
}

const cakePriceCache = {
value: new BigNumber(0),
timestamp: 0,
}
const getCakePrice = async () => {
const now = Date.now()
// cache for 10 minutes
if (now - cakePriceCache.timestamp < 1000 * 60 * 10) {
return cakePriceCache.value
}
return new BigNumber(await getCakePriceFromOracle())
}
const getCakePrice = async () => new BigNumber(await getCakePriceFromOracle())
const getV2PoolsCakeAprByChainId = async (
pools: Array<V2PoolInfo | StablePoolInfo>,
chainId: number,
Expand Down

0 comments on commit 7b51da5

Please sign in to comment.