1
+ // Template pulled from https://github.com/cctdaniel/pyth-tv-charting-lib/blob/6adfdfcd0c4cf9c503ab154d4d4570a634a0ddbe/src/utils/datafeed.js
1
2
import {
2
3
subscribeOnStream ,
3
4
unsubscribeFromStream ,
@@ -23,7 +24,6 @@ const getPriceScale = (symbol: string) => {
23
24
24
25
const datafeed = {
25
26
onReady : ( callback : any ) => {
26
- console . log ( '[onReady]: Method call' )
27
27
fetch ( `${ API_ENDPOINT } /config` ) . then ( ( response ) => {
28
28
response . json ( ) . then ( ( configurationData ) => {
29
29
setTimeout ( ( ) => callback ( configurationData ) )
@@ -36,7 +36,6 @@ const datafeed = {
36
36
symbolType : any ,
37
37
onResultReadyCallback : any ,
38
38
) => {
39
- console . log ( '[searchSymbols]: Method call' )
40
39
fetch ( `${ API_ENDPOINT } /search?query=${ userInput } ` ) . then ( ( response ) => {
41
40
response . json ( ) . then ( ( data ) => {
42
41
onResultReadyCallback ( data )
@@ -87,7 +86,6 @@ const datafeed = {
87
86
onErrorCallback : any ,
88
87
) => {
89
88
const { from, to, firstDataRequest } = periodParams
90
- console . log ( '[getBars]: Method call' , symbolInfo , resolution , from , to )
91
89
92
90
const maxRangeInSeconds = 365 * 24 * 60 * 60 // 1 year in seconds
93
91
@@ -140,10 +138,6 @@ const datafeed = {
140
138
subscriberUID : any ,
141
139
onResetCacheNeededCallback : any ,
142
140
) => {
143
- console . log (
144
- '[subscribeBars]: Method call with subscriberUID:' ,
145
- subscriberUID ,
146
- )
147
141
subscribeOnStream (
148
142
symbolInfo ,
149
143
resolution ,
@@ -154,10 +148,6 @@ const datafeed = {
154
148
)
155
149
} ,
156
150
unsubscribeBars : ( subscriberUID : any ) => {
157
- console . log (
158
- '[unsubscribeBars]: Method call with subscriberUID:' ,
159
- subscriberUID ,
160
- )
161
151
unsubscribeFromStream ( subscriberUID )
162
152
} ,
163
153
}
0 commit comments