From ebaf3a330f8e89fb8987dfdad3815fde3d81a5ef Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 20 Aug 2024 17:53:19 +0800 Subject: [PATCH] twap: pull out submitOrder method --- pkg/twap/v2/stream_executor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/twap/v2/stream_executor.go b/pkg/twap/v2/stream_executor.go index 9fb2e9a50..75214cfe1 100644 --- a/pkg/twap/v2/stream_executor.go +++ b/pkg/twap/v2/stream_executor.go @@ -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 }