xfunding: check spotSession, futuresSession names

This commit is contained in:
c9s 2023-03-22 21:42:44 +08:00
parent d6c430a4b4
commit e607fc19ac
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -128,6 +128,14 @@ func (s *Strategy) Validate() error {
return errors.New("symbol is required")
}
if len(s.SpotSession) == 0 {
return errors.New("spotSession name is required")
}
if len(s.FuturesSession) == 0 {
return errors.New("futuresSession name is required")
}
return nil
}