From 2bdcf2266d90971c058194406ec7a327b3c0bfb8 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 2 May 2022 10:39:19 +0800 Subject: [PATCH] fix default sync logic --- pkg/bbgo/environment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/bbgo/environment.go b/pkg/bbgo/environment.go index 3a0a9bdd4..6ef2d3440 100644 --- a/pkg/bbgo/environment.go +++ b/pkg/bbgo/environment.go @@ -623,6 +623,10 @@ func (environ *Environment) Sync(ctx context.Context, userConfig ...*Config) err return err } + if len(userConfig) == 0 { + continue + } + if userConfig[0].Sync.DepositHistory { if err := environ.SyncService.SyncDepositHistory(ctx, session.Exchange); err != nil { return err