Pyth price fetching (#723)
* env: remove testing library * fix: use pyth over oracle * fix: fix the endpoints * fix: fix build * tidy: refactor * fix: fixed account fetching * fix: made all queries chain agnostic * fix: fixed the chart position
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { defaultSymbolInfo } from 'components/Trade/TradeChart/constants'
|
||||
import { MILLISECONDS_PER_MINUTE } from 'constants/math'
|
||||
import { pythEndpoints } from 'constants/pyth'
|
||||
import { byDenom } from 'utils/array'
|
||||
import {
|
||||
Bar,
|
||||
@@ -74,7 +75,7 @@ export class DataFeed implements IDatafeedChartApi {
|
||||
chainConfig: ChainConfig,
|
||||
) {
|
||||
if (debug) console.log('Start charting library datafeed')
|
||||
this.candlesEndpoint = chainConfig.endpoints.pythCandles
|
||||
this.candlesEndpoint = pythEndpoints.candles
|
||||
this.candlesEndpointTheGraph = chainConfig.endpoints.graphCandles ?? ''
|
||||
this.assets = assets
|
||||
this.debug = debug
|
||||
|
||||
@@ -160,7 +160,7 @@ export const TVChartContainer = (props: Props) => {
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
contentClassName='px-0.5 pb-0.5 h-full bg-chart'
|
||||
contentClassName='px-0.5 pb-0.5 h-full bg-chart w-[calc(100%-2px)] ml-[1px]'
|
||||
className='h-[70dvh] max-h-[980px] min-h-[560px]'
|
||||
>
|
||||
<div ref={chartContainerRef} className='h-[calc(100%-32px)] overflow-hidden' />
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function TradeChart(props: Props) {
|
||||
<Loading className='h-4 mr-4 w-60' />
|
||||
</div>
|
||||
}
|
||||
contentClassName='px-0.5 pb-0.5 h-full'
|
||||
contentClassName='px-0.5 pb-0.5 h-full bg-chart w-[calc(100%-2px)] ml-[1px]'
|
||||
className='h-[70dvh] max-h-[980px] min-h-[560px]'
|
||||
>
|
||||
<div className='flex items-center justify-center w-full h-[calc(100%-32px)] rounded-b-base bg-chart'>
|
||||
|
||||
Reference in New Issue
Block a user