binance-api-node
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -311,3 +311,3 @@ 'use strict'; | ||
return function (msg) { | ||
var _JSON$parse5 = JSON.parse(msg), | ||
var _JSON$parse5 = JSON.parse(msg.data), | ||
type = _JSON$parse5.e, | ||
@@ -338,4 +338,4 @@ rest = _objectWithoutProperties(_JSON$parse5, ['e']); | ||
var w = (0, _openWebsocket2.default)(BASE + '/' + listenKey); | ||
w.onmessage = function () { | ||
return userEventHandler(cb); | ||
w.onmessage = function (msg) { | ||
return userEventHandler(cb)(msg); | ||
}; | ||
@@ -342,0 +342,0 @@ |
{ | ||
"name": "binance-api-node", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -243,3 +243,3 @@ import zip from 'lodash.zipobject' | ||
export const userEventHandler = cb => msg => { | ||
const { e: type, ...rest } = JSON.parse(msg) | ||
const { e: type, ...rest } = JSON.parse(msg.data) | ||
cb(userTransforms[type] ? userTransforms[type](rest) : { type, ...rest }) | ||
@@ -255,3 +255,3 @@ } | ||
const w = openWebSocket(`${BASE}/${listenKey}`) | ||
w.onmessage = () => (userEventHandler(cb)) | ||
w.onmessage = (msg) => (userEventHandler(cb)(msg)) | ||
@@ -258,0 +258,0 @@ const int = setInterval(keepStreamAlive(keepDataStream, listenKey), 50e3) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240351