strategy: fix wrong string formatting syntax

This commit is contained in:
Andy Cheng 2022-04-25 18:45:02 +08:00
parent 6b62f27155
commit 7326a1b21d

View File

@ -398,11 +398,11 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
s.OnSuspend(func() {
// Cancel all order
if err := s.activeOrders.GracefulCancel(ctx, session.Exchange); err != nil {
errMsg := "Not all {s.Symbol} orders are cancelled! Please check again."
errMsg := fmt.Sprintf("Not all %s orders are cancelled! Please check again.", s.Symbol)
log.WithError(err).Errorf(errMsg)
s.Notify(errMsg)
} else {
s.Notify("All {s.Symbol} orders are cancelled.")
s.Notify("All %s orders are cancelled.", s.Symbol)
}
// Save state