@@ -3,6 +3,8 @@ import { and, eq, between, lte, desc, or, inArray } from 'drizzle-orm';
33import _ from 'lodash' ;
44import { BigNumber , bignumber , max , min } from 'mathjs' ;
55
6+ import { Interval } from './types' ;
7+
68import { LONG_CACHE_TTL } from '~/config/constants' ;
79import { Timeframe , TIMEFRAME_ROUNDING } from '~/controllers/main-controller.constants' ;
810import { db } from '~/database/client' ;
@@ -13,8 +15,6 @@ import { toNearestDate } from '~/utils/date';
1315import { logger } from '~/utils/logger' ;
1416import { prettyNumber } from '~/utils/numbers' ;
1517
16- import { Interval } from './types' ;
17-
1818export const constructCandlesticks = async ( intervals : Interval [ ] , timeframe : number ) => {
1919 const groups = groupIntervals ( intervals , timeframe ) ;
2020
@@ -95,7 +95,6 @@ export const getPrices = async (
9595
9696 if ( baseTokenData . length === 0 || quoteTokenData . length === 0 ) {
9797 // no data to build the chart...
98- logger . warn ( 'No data to build the chart' ) ;
9998 return [ ] ;
10099 }
101100
@@ -104,11 +103,6 @@ export const getPrices = async (
104103 let start = dayjs ( tokenData . start ) . startOf ( unit ) ;
105104 const end = dayjs ( endTimestamp ) . startOf ( unit ) . unix ( ) ;
106105
107- logger . info (
108- { s : startTimestamp . toISOString ( ) , start : start . toISOString ( ) , end : dayjs ( endTimestamp ) . toISOString ( ) } ,
109- 'Building chart' ,
110- ) ;
111-
112106 const items : PriceItem [ ] = [ ] ;
113107
114108 while ( start . unix ( ) <= end ) {
0 commit comments