Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_handleTickerMessage (msg = [], chanData = {}) {
let data = getMessagePayload(msg)
if (this._transform) {
data = (chanData.symbol || '')[0] === 't'
? new TradingTicker([chanData.symbol, ...msg[1]])
: new FundingTicker([chanData.symbol, ...msg[1]])
}
const internalMessage = [chanData.chanId, 'ticker', data]
internalMessage.filterOverride = [chanData.symbol]
this._propagateMessageToListeners(internalMessage, chanData, false)
this.emit('ticker', chanData.symbol, data)
}