New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

binance

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binance - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

3

CHANGELOG.md
# Changelog
## 1.3.1
- Fix error handling for callbacks when response is empty, introduced by clock drift changes
## 1.3.0

@@ -4,0 +7,0 @@ - Add the ability to have the library handle system clock drift

9

lib/rest.js

@@ -73,3 +73,5 @@ const request = require('request');

}
if (err || response.statusCode < 200 || response.statusCode > 299) {
if (err) {
callback(err, payload);
} else if (response.statusCode < 200 || response.statusCode > 299) {
/*

@@ -89,3 +91,3 @@ * If we get a response that the timestamp is ahead of the server,

} else {
callback(err || new Error(`Response code ${response.statusCode}`), payload);
callback(new Error(`Response code ${response.statusCode}`), payload);
}

@@ -127,3 +129,4 @@ } else {

query.timestamp = this._getTime() + this._drift;
return this._makeRequest(query, callback, route, security, method, ++attempt);
return this._makeRequest(query, callback, route, security,
method, ++attempt);
})

@@ -130,0 +133,0 @@ .then(retryPayload => {

{
"name": "binance",
"version": "1.3.0",
"version": "1.3.1",
"description": "node.js wrapper for the Binance REST and WebSocket APIs",

@@ -5,0 +5,0 @@ "main": "./lib/binance.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc