From 96c61eb4c32175516395485041db2e6b6a2f2c23 Mon Sep 17 00:00:00 2001 From: Owen Wu Date: Mon, 9 Sep 2024 21:37:01 +0800 Subject: [PATCH] feat: ok for update position action --- Makefile | 2 +- pkg/env/exchange/exchange_entity.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6ce7b16..fae7755 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: clean build unit-test run docker-* tag release NAME=trading-gpt -VERSION=0.26.10 +VERSION=0.27.0 clean: rm -rf build/* diff --git a/pkg/env/exchange/exchange_entity.go b/pkg/env/exchange/exchange_entity.go index a3e9fbf..853b981 100644 --- a/pkg/env/exchange/exchange_entity.go +++ b/pkg/env/exchange/exchange_entity.go @@ -656,9 +656,7 @@ func (s *ExchangeEntity) UpdatePositionV2(ctx context.Context, side types.SideTy err := service.UpdatePosition(ctx, tmpPos) if err != nil { log.WithError(err).Error("UpdatePositionV2_fail") - - log.Info("fallback_to_UpdatePosition") - return s.UpdatePosition(ctx, side, closePrice, args...) + return errors.Wrap(err, "UpdatePositionV2_UpdatePosition_error") } log.Info("UpdatePositionV2_ok")