@@ -5544,7 +5544,7 @@ export default class Binance {
55445544 this . Options . balance_callback = balance_callback ;
55455545 this . Options . execution_callback = execution_callback ? execution_callback : balance_callback ; //This change is required to listen for Orders
55465546 this . Options . list_status_callback = list_status_callback ;
5547- const subscription = this . subscribe ( this . Options . listenKey , this . userDataHandler , reconnect ) ;
5547+ const subscription = this . subscribe ( this . Options . listenKey , this . userDataHandler . bind ( this ) , reconnect ) ;
55485548 if ( subscribed_callback ) subscribed_callback ( subscription . endpoint ) ;
55495549 } ) ;
55505550 }
@@ -5580,7 +5580,7 @@ export default class Binance {
55805580 this . Options . margin_balance_callback = balance_callback ;
55815581 this . Options . margin_execution_callback = execution_callback ;
55825582 this . Options . margin_list_status_callback = list_status_callback ;
5583- const subscription = this . subscribe ( this . Options . listenMarginKey , this . userMarginDataHandler , reconnect ) ;
5583+ const subscription = this . subscribe ( this . Options . listenMarginKey , this . userMarginDataHandler . bind ( this ) , reconnect ) ;
55845584 if ( subscribed_callback ) subscribed_callback ( subscription . endpoint ) ;
55855585 } ) ;
55865586 }
@@ -5618,7 +5618,7 @@ export default class Binance {
56185618 this . Options . future_account_update_callback = account_update_callback ;
56195619 this . Options . future_account_config_update_callback = account_config_update_callback ;
56205620 this . Options . future_order_update_callback = order_update_callback ;
5621- const subscription = this . futuresSubscribe ( this . Options . listenFutureKey , this . userFutureDataHandler , { reconnect } ) ;
5621+ const subscription = this . futuresSubscribe ( this . Options . listenFutureKey , this . userFutureDataHandler . bind ( this ) , { reconnect } ) ;
56225622 if ( subscribed_callback ) subscribed_callback ( subscription . endpoint ) ;
56235623
56245624 } ) ;
@@ -5679,7 +5679,7 @@ export default class Binance {
56795679 this . Options . delivery_order_update_callback = order_update_callback ;
56805680 const subscription = this . deliverySubscribe (
56815681 this . Options . listenDeliveryKey ,
5682- this . userDeliveryDataHandler ,
5682+ this . userDeliveryDataHandler . bind ( this ) ,
56835683 { reconnect }
56845684 ) ;
56855685 if ( subscribed_callback ) subscribed_callback ( subscription . endpoint ) ;
0 commit comments