Skip to content

Commit 4c6d77b

Browse files
committed
Updated
1 parent c85d4c2 commit 4c6d77b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/app/autopilot/autopilot.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export class AutopilotComponent implements OnInit, OnDestroy {
319319
this.executedIndex = 0;
320320
this.lastOrderListIndex = 0;
321321
this.isTradingStarted = false;
322-
this.cartService.removeComplatedOrders();
322+
this.cartService.removeCompletedOrders();
323323
}
324324

325325
decreaseRiskTolerance() {

src/app/shared/services/cart.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,10 @@ export class CartService {
234234
id
235235
};
236236
}
237+
238+
removeCompletedOrders() {
239+
this.buyOrders = this.buyOrders.filter(order => order.orderSize < order.quantity);
240+
this.sellOrders = this.sellOrders.filter(order => order.orderSize < order.quantity);
241+
this.otherOrders = this.otherOrders.filter(order => order.orderSize < order.quantity);
242+
}
237243
}

0 commit comments

Comments
 (0)