From 4a878b55965893cd9b0ae95cd777c3b48f957ced Mon Sep 17 00:00:00 2001 From: zenix Date: Fri, 2 Sep 2022 19:22:26 +0900 Subject: [PATCH] fix: rename generalorderexecutor.cancel to gracefulcancelorder --- pkg/bbgo/order_executor_general.go | 2 +- pkg/strategy/elliottwave/strategy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/bbgo/order_executor_general.go b/pkg/bbgo/order_executor_general.go index 33b119d11..97e1fbcdc 100644 --- a/pkg/bbgo/order_executor_general.go +++ b/pkg/bbgo/order_executor_general.go @@ -144,7 +144,7 @@ func (e *GeneralOrderExecutor) GracefulCancelActiveOrderBook(ctx context.Context return nil } -func (e *GeneralOrderExecutor) Cancel(ctx context.Context, order types.Order) error { +func (e *GeneralOrderExecutor) GracefulCancelOrder(ctx context.Context, order types.Order) error { if e.activeMakerOrders.NumOfOrders() == 0 { return nil } diff --git a/pkg/strategy/elliottwave/strategy.go b/pkg/strategy/elliottwave/strategy.go index 6c9badbc6..ce461b938 100644 --- a/pkg/strategy/elliottwave/strategy.go +++ b/pkg/strategy/elliottwave/strategy.go @@ -187,7 +187,7 @@ func (s *Strategy) smartCancel(ctx context.Context, pricef float64) int { panic("not supported side for the order") } if toCancel { - err := s.GeneralOrderExecutor.Cancel(ctx, order) + err := s.GeneralOrderExecutor.GracefulCancelOrder(ctx, order) if err == nil { delete(s.orderPendingCounter, order.OrderID) } else {