Skip to content

Commit

Permalink
remove STRK price request
Browse files Browse the repository at this point in the history
  • Loading branch information
iamoskvin committed Mar 22, 2024
1 parent 16613bf commit 60950e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/Rewards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,7 @@ export default function Rewards() {
const rewardsRespStr = await rewardsResp.text()
const rewardsRespStrClean = rewardsRespStr.replace(/\bNaN\b/g, "null")
const rewardsRespJson = JSON.parse(rewardsRespStrClean)
const priceResp = await fetch(STRK_PRICE_API_URL).then(res => res.json())

const strkPrice = parseFloat(priceResp.price)
const jediRewards = rewardsRespJson.Jediswap_v1
const rewardsPositions: any = []
for (const pair of pairs) {
Expand All @@ -477,7 +475,7 @@ export default function Rewards() {
dayData => dayData.pairId === pair.poolAddress && dayData.date === recentDate + 'T00:00:00'
)
const aprFee = ((pairDayData.dailyVolumeUSD * 0.003) / pairDayData.reserveUSD) * 365 * 100
const aprStarknet = (rewardsData.allocation / pairDayData.reserveUSD) * 365 * 100 * strkPrice
const aprStarknet = rewardsData.apr * 100
rewardsPositions.push({
...pair,
reserveUSD: pairDayData.reserveUSD,
Expand Down

0 comments on commit 60950e6

Please sign in to comment.