remove console logs
This commit is contained in:
parent
b974a84461
commit
9c8ef98cfd
|
@ -109,7 +109,6 @@ export const queryBars = async (
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
onReady: (callback: (configuration: DatafeedConfiguration) => void) => {
|
onReady: (callback: (configuration: DatafeedConfiguration) => void) => {
|
||||||
// console.log('[onReady]: Method call')
|
|
||||||
setTimeout(() => callback(configurationData as any))
|
setTimeout(() => callback(configurationData as any))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -128,14 +127,6 @@ export default {
|
||||||
// _onResolveErrorCallback: any,
|
// _onResolveErrorCallback: any,
|
||||||
// _extension: any
|
// _extension: any
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
|
||||||
// '[resolveSymbol]: Method call',
|
|
||||||
// symbolAddress,
|
|
||||||
// onSymbolResolvedCallback
|
|
||||||
// )
|
|
||||||
// const symbols = await getAllSymbols()
|
|
||||||
// let symbolItem = symbols.find((item: any) => item.address === symbolAddress)
|
|
||||||
// console.log('========symbols:', symbolItem, symbols)
|
|
||||||
let symbolItem:
|
let symbolItem:
|
||||||
| {
|
| {
|
||||||
address: string
|
address: string
|
||||||
|
@ -175,7 +166,6 @@ export default {
|
||||||
format: 'price',
|
format: 'price',
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log('[resolveSymbol]: Symbol resolved', symbolAddress)
|
|
||||||
onSymbolResolvedCallback(symbolInfo)
|
onSymbolResolvedCallback(symbolInfo)
|
||||||
},
|
},
|
||||||
getBars: async (
|
getBars: async (
|
||||||
|
@ -215,7 +205,6 @@ export default {
|
||||||
...bars[bars.length - 1],
|
...bars[bars.length - 1],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// console.log(`[getBars]: returned ${bars.length} bar(s)`)
|
|
||||||
onHistoryCallback(bars, {
|
onHistoryCallback(bars, {
|
||||||
noData: false,
|
noData: false,
|
||||||
})
|
})
|
||||||
|
@ -232,10 +221,6 @@ export default {
|
||||||
subscriberUID: string,
|
subscriberUID: string,
|
||||||
onResetCacheNeededCallback: () => void
|
onResetCacheNeededCallback: () => void
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
|
||||||
// '[subscribeBars]: Method call with subscriberUID:',
|
|
||||||
// subscriberUID
|
|
||||||
// )
|
|
||||||
subscribeOnStream(
|
subscribeOnStream(
|
||||||
symbolInfo,
|
symbolInfo,
|
||||||
resolution,
|
resolution,
|
||||||
|
|
|
@ -21,7 +21,7 @@ socket.addEventListener('open', (_event) => {
|
||||||
socket.addEventListener('message', (msg) => {
|
socket.addEventListener('message', (msg) => {
|
||||||
const data = JSON.parse(msg.data)
|
const data = JSON.parse(msg.data)
|
||||||
|
|
||||||
if (data.type !== 'PRICE_DATA') return console.log(data)
|
if (data.type !== 'PRICE_DATA') return console.warn(data)
|
||||||
|
|
||||||
const currTime = data.data.unixTime * 1000
|
const currTime = data.data.unixTime * 1000
|
||||||
const lastBar = subscriptionItem.lastBar
|
const lastBar = subscriptionItem.lastBar
|
||||||
|
@ -39,7 +39,6 @@ socket.addEventListener('message', (msg) => {
|
||||||
close: data.data.c,
|
close: data.data.c,
|
||||||
volume: data.data.v,
|
volume: data.data.v,
|
||||||
}
|
}
|
||||||
// console.log('[socket] Generate new bar')
|
|
||||||
} else {
|
} else {
|
||||||
bar = {
|
bar = {
|
||||||
...lastBar,
|
...lastBar,
|
||||||
|
@ -48,7 +47,6 @@ socket.addEventListener('message', (msg) => {
|
||||||
close: data.data.c,
|
close: data.data.c,
|
||||||
volume: data.data.v,
|
volume: data.data.v,
|
||||||
}
|
}
|
||||||
// console.log('[socket] Update the latest bar by price')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subscriptionItem.lastBar = bar
|
subscriptionItem.lastBar = bar
|
||||||
|
|
|
@ -3,8 +3,6 @@ export const fetchChartData = async (
|
||||||
quoteTokenId: string | undefined,
|
quoteTokenId: string | undefined,
|
||||||
daysToShow: string
|
daysToShow: string
|
||||||
) => {
|
) => {
|
||||||
console.log('fetching chart:', baseTokenId, quoteTokenId)
|
|
||||||
|
|
||||||
if (!baseTokenId || !quoteTokenId) return
|
if (!baseTokenId || !quoteTokenId) return
|
||||||
try {
|
try {
|
||||||
const [inputResponse, outputResponse] = await Promise.all([
|
const [inputResponse, outputResponse] = await Promise.all([
|
||||||
|
|
|
@ -21,7 +21,7 @@ const getRecentPerformance = async (
|
||||||
|
|
||||||
setTps(tps)
|
setTps(tps)
|
||||||
} catch {
|
} catch {
|
||||||
console.log('Unable to fetch TPS')
|
console.warn('Unable to fetch TPS')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,6 @@ const PerpMarketsTable = ({
|
||||||
const showTableView = width ? width > breakpoints.md : false
|
const showTableView = width ? width > breakpoints.md : false
|
||||||
const rate = usePerpFundingRate()
|
const rate = usePerpFundingRate()
|
||||||
|
|
||||||
console.log(coingeckoPrices.find((asset) => asset.symbol === 'soBTC'))
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ContentBox hideBorder hidePadding>
|
<ContentBox hideBorder hidePadding>
|
||||||
{showTableView ? (
|
{showTableView ? (
|
||||||
|
|
|
@ -76,7 +76,7 @@ const TradingViewChartKline = ({ setIsFullView, isFullView }: Props) => {
|
||||||
return dataList
|
return dataList
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
console.log(e)
|
console.error(e)
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ const TradingViewChartKline = ({ setIsFullView, isFullView }: Props) => {
|
||||||
try {
|
try {
|
||||||
fetchFreshData(365)
|
fetchFreshData(365)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Error fetching new data')
|
console.error('Error fetching new data')
|
||||||
}
|
}
|
||||||
chart.loadMore(() => null)
|
chart.loadMore(() => null)
|
||||||
})
|
})
|
||||||
|
|
|
@ -99,10 +99,6 @@ const UnsettledTrades = ({
|
||||||
mangoAccountPnl >= 0 ? mangoAccount : filteredAccounts[0].mangoAccount
|
mangoAccountPnl >= 0 ? mangoAccount : filteredAccounts[0].mangoAccount
|
||||||
const unprofitableAccount =
|
const unprofitableAccount =
|
||||||
mangoAccountPnl < 0 ? mangoAccount : filteredAccounts[0].mangoAccount
|
mangoAccountPnl < 0 ? mangoAccount : filteredAccounts[0].mangoAccount
|
||||||
// const profitableAccount = mangoAccount
|
|
||||||
// const unprofitableAccount =
|
|
||||||
// filteredAccounts[filteredAccounts.length - 1].mangoAccount
|
|
||||||
// console.log('unprofitableAccount', unprofitableAccount)
|
|
||||||
|
|
||||||
const txid = await client.perpSettlePnl(
|
const txid = await client.perpSettlePnl(
|
||||||
group,
|
group,
|
||||||
|
|
|
@ -1034,7 +1034,7 @@ const mangoStore = create<MangoStore>()(
|
||||||
state.selectedMarket.fills = loadedFills
|
state.selectedMarket.fills = loadedFills
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Error fetching fills:', err)
|
console.error('Error fetching fills:', err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchTradeHistory(offset = 0) {
|
async fetchTradeHistory(offset = 0) {
|
||||||
|
@ -1087,8 +1087,6 @@ const mangoStore = create<MangoStore>()(
|
||||||
)
|
)
|
||||||
newProvider.opts.skipPreflight = true
|
newProvider.opts.skipPreflight = true
|
||||||
const newClient = initMangoClient(newProvider)
|
const newClient = initMangoClient(newProvider)
|
||||||
console.log('here')
|
|
||||||
|
|
||||||
set((state) => {
|
set((state) => {
|
||||||
state.connection = newConnection
|
state.connection = newConnection
|
||||||
state.client = newClient
|
state.client = newClient
|
||||||
|
|
Loading…
Reference in New Issue