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 4, 2024
1 parent 3186da1 commit ccf18d2
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 ccf18d2

Please sign in to comment.