mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
avoid using panic when order cancel failed
This commit is contained in:
parent
744af85a94
commit
634ce6180b
|
@ -6,11 +6,9 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||||
"github.com/c9s/bbgo/pkg/types"
|
"github.com/c9s/bbgo/pkg/types"
|
||||||
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultFeeRate set the fee rate for most cases
|
// DefaultFeeRate set the fee rate for most cases
|
||||||
|
@ -88,8 +86,6 @@ func (m *SimplePriceMatching) CancelOrder(o types.Order) (types.Order, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !found {
|
if !found {
|
||||||
logrus.Panicf("cancel order failed, order %d not found: %+v", o.OrderID, o)
|
|
||||||
|
|
||||||
return o, fmt.Errorf("cancel order failed, order %d not found: %+v", o.OrderID, o)
|
return o, fmt.Errorf("cancel order failed, order %d not found: %+v", o.OrderID, o)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user