Quiet noisy datafeed debug messages
This commit is contained in:
@@ -8,6 +8,9 @@ import {useStore} from "@/store/store.js";
|
|||||||
import {subOHLC, unsubOHLC} from "@/blockchain/ohlcs.js";
|
import {subOHLC, unsubOHLC} from "@/blockchain/ohlcs.js";
|
||||||
import {socket} from "@/socket.js";
|
import {socket} from "@/socket.js";
|
||||||
|
|
||||||
|
// disable debug messages logging
|
||||||
|
let console = { log: function() {} }
|
||||||
|
|
||||||
let feeDropdown = null
|
let feeDropdown = null
|
||||||
let widget = null
|
let widget = null
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import {useStore} from "@/store/store.js";
|
import {useStore} from "@/store/store.js";
|
||||||
// import {metadataMap} from "@/version.js";
|
|
||||||
|
// disable debug messages logging
|
||||||
|
let console = { log: function() {} }
|
||||||
|
|
||||||
const file_res = ['1m', '3m', '5m', '10m', '15m', '30m', '1H', '2H', '4H', '8H', '12H', '1D', '2D', '3D', '1W',];
|
const file_res = ['1m', '3m', '5m', '10m', '15m', '30m', '1H', '2H', '4H', '8H', '12H', '1D', '2D', '3D', '1W',];
|
||||||
const supported_res = ['1', '3', '5', '10', '15', '30', '60', '120', '240', '480', '720', '1D', '2D', '3D', '1W',];
|
const supported_res = ['1', '3', '5', '10', '15', '30', '60', '120', '240', '480', '720', '1D', '2D', '3D', '1W',];
|
||||||
@@ -86,12 +88,7 @@ export async function jBars (symbol, contract, from, to, res) {
|
|||||||
let baseURL = "https://alpha.dexorder.trade/ohlc/"
|
let baseURL = "https://alpha.dexorder.trade/ohlc/"
|
||||||
|
|
||||||
let chainId = useStore().chainId
|
let chainId = useStore().chainId
|
||||||
// const meta = metadataMap[contract]
|
|
||||||
// if (meta===undefined) {
|
|
||||||
// console.log('warning: no symbol', contract)
|
|
||||||
// return [bars, {noData:true}]
|
|
||||||
// }
|
|
||||||
// console.log('metadata', contract, metadataMap, meta)
|
|
||||||
inverted = symbol.inverted
|
inverted = symbol.inverted
|
||||||
if (symbol.x?.data) {
|
if (symbol.x?.data) {
|
||||||
baseURL = symbol.x.data.uri
|
baseURL = symbol.x.data.uri
|
||||||
@@ -124,9 +121,6 @@ export async function jBars (symbol, contract, from, to, res) {
|
|||||||
if ( ohlc[iohlc][0]*1000 >= iDate.getTime() ) break;
|
if ( ohlc[iohlc][0]*1000 >= iDate.getTime() ) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(`iohlc: ${iohlc}`);
|
|
||||||
|
|
||||||
// let ohlcDate = iohlc >= ohlc.length ? undefined : new Date(ohlc[iohlc][0]+'Z');
|
|
||||||
let ohlcDate = iohlc >= ohlc.length ? undefined : new Date(ohlc[iohlc][0]*1000);
|
let ohlcDate = iohlc >= ohlc.length ? undefined : new Date(ohlc[iohlc][0]*1000);
|
||||||
|
|
||||||
// no ohlc sample file, or sample file exists and asking for sample beyond last sample, insert missing sample
|
// no ohlc sample file, or sample file exists and asking for sample beyond last sample, insert missing sample
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ socket.on('disconnect', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
socket.on('p', async (chainId, pool, price) => {
|
socket.on('p', async (chainId, pool, price) => {
|
||||||
console.log('pool price from message', chainId, pool, price)
|
// console.log('pool price from message', chainId, pool, price)
|
||||||
const s = useStore()
|
const s = useStore()
|
||||||
if( s.chainId !== chainId )
|
if( s.chainId !== chainId )
|
||||||
return
|
return
|
||||||
@@ -23,7 +23,7 @@ socket.on('p', async (chainId, pool, price) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
socket.on('ohlc', async (chainId, pool, ohlcs) => {
|
socket.on('ohlc', async (chainId, pool, ohlcs) => {
|
||||||
console.log('pool bars', pool, ohlcs)
|
// console.log('pool bars', pool, ohlcs)
|
||||||
DataFeed.poolCallback(chainId, pool, ohlcs)
|
DataFeed.poolCallback(chainId, pool, ohlcs)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user