Skip to content

Commit

Permalink
Fetch cfg price history from updated uniswap subgraph (#2420)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Aug 30, 2024
1 parent 2ffab9a commit 47af6ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions centrifuge-app/src/utils/useCFGTokenPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ async function getWCFGPrice() {
}

export const useCFGTokenPrice = () => {
const { data: CFGPrice } = useQuery('wCFGPrice', () => getWCFGPrice())
const { data: CFGPrice } = useQuery('wCFGPrice', () => {
return getWCFGPrice()
})
return CFGPrice
}

Expand Down Expand Up @@ -61,7 +63,10 @@ export const useDailyCFGPrice = (filter: 'YTD' | '30days' | '90days') => {
}),
}

const res = await fetch('https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3', options)
const res = await fetch(
`https://gateway.thegraph.com/api/9cdc906f79cb4b557d79846a994f6564/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`,
options
)
return res.json()
})
}

0 comments on commit 47af6ec

Please sign in to comment.