Skip to content

Commit

Permalink
fix(bybit): dont remove orders from store manually
Browse files Browse the repository at this point in the history
  • Loading branch information
iam4x committed Apr 20, 2023
1 parent 02f94f1 commit ec5082c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/exchanges/bybit/bybit.exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,15 +642,6 @@ export class BybitExchange extends BaseExchange {

if (v(data, 'retMsg') !== 'OK') {
this.emitter.emit('error', v(data, 'retMsg'));
} else {
const list = Array.isArray(data.result) ? data.result : [];
// we use `startsWith` because we generate SL and TP orders with
// their original ID `[order_id]__stop_loss` and `[order_id]__take_profit`
this.store.removeOrders(
this.store.orders.filter(
(order) => !list.some((id: string) => order.id.startsWith(id))
)
);
}
};

Expand Down

0 comments on commit ec5082c

Please sign in to comment.