symbol id fixes
This commit is contained in:
@@ -16,17 +16,16 @@ export function subOHLC( chainId, pool, period ) {
|
||||
|
||||
|
||||
export function unsubOHLC( chainId, pool, period ) {
|
||||
for( const [pool,period] of poolPeriods ) {
|
||||
const key = `${pool}|${period}`
|
||||
const ckey = `${chainId}|${key}`
|
||||
if (!(ckey in ohlcSubCounts) || ohlcSubCounts[ckey] === 0) {
|
||||
console.error('overdecremented ohlc', pool, period)
|
||||
ohlcSubCounts[ckey] = 1
|
||||
} else {
|
||||
ohlcSubCounts[ckey]--
|
||||
if (ohlcSubCounts[key] === 0)
|
||||
socket.emit('unsubOHLCs', chainId, [key])
|
||||
}
|
||||
const key = `${pool}|${period}`
|
||||
const ckey = `${chainId}|${key}`
|
||||
if (!(ckey in ohlcSubCounts) || ohlcSubCounts[ckey] === 0) {
|
||||
console.error('overdecremented ohlc', pool, period)
|
||||
ohlcSubCounts[ckey] = 1
|
||||
} else {
|
||||
ohlcSubCounts[ckey]--
|
||||
if (ohlcSubCounts[key] === 0)
|
||||
// noinspection JSCheckFunctionSignatures
|
||||
socket.emit('unsubOHLCs', chainId, [key])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user