Skip to content

Commit

Permalink
fix: deprecate outboundAccountInfo
Browse files Browse the repository at this point in the history
Fixes jaggedsoft#491

Ideally this would warrant a breaking change of the library
but since the new endpoint returns a subset that is consistent
with previous behavior, and understanding the risk assessment
of letting thousands of consumers of the library have their applications
be broken, it seems smart to pipe one stream into the other.
  • Loading branch information
gunar committed Sep 8, 2020
1 parent 8c7ac82 commit 6075392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node-binance-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1880,13 +1880,13 @@ let api = function Binance( options = {} ) {
const userDataHandler = data => {
let type = data.e;
if ( type === 'outboundAccountInfo' ) {
Binance.options.balance_callback( data );
// XXX: Deprecated in 2020-09-08
} else if ( type === 'executionReport' ) {
if ( Binance.options.execution_callback ) Binance.options.execution_callback( data );
} else if ( type === 'listStatus' ) {
if ( Binance.options.list_status_callback ) Binance.options.list_status_callback( data );
} else if ( type === 'outboundAccountPosition' ) {
// TODO: Does this mean something?
Binance.options.balance_callback( data );
} else {
Binance.options.log( 'Unexpected userData: ' + type );
}
Expand Down

0 comments on commit 6075392

Please sign in to comment.