twap: pull out submitOrder method

This commit is contained in:
c9s 2024-08-20 17:53:19 +08:00
parent a0cbf82d97
commit ebaf3a330f
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -363,7 +363,11 @@ func (e *FixedQuantityExecutor) updateOrder(ctx context.Context) error {
return nil
}
createdOrder, err := e.exchange.SubmitOrder(ctx, *orderForm)
return e.submitOrder(ctx, *orderForm)
}
func (e *FixedQuantityExecutor) submitOrder(ctx context.Context, orderForm types.SubmitOrder) error {
createdOrder, err := e.exchange.SubmitOrder(ctx, orderForm)
if err != nil {
return err
}