feat(store): prevent deletion of active strategies and update translations (#1461)

Co-authored-by: Dean <afei.wuhao@gmail.com>
This commit is contained in:
deanokk
2026-04-11 01:09:13 +08:00
committed by GitHub
parent 6fe849c18d
commit a1af4fec58
4 changed files with 68 additions and 25 deletions

View File

@@ -444,6 +444,9 @@ func (s *StrategyStore) Delete(userID, id string) error {
if st.IsDefault {
return fmt.Errorf("cannot delete system default strategy")
}
if st.IsActive {
return fmt.Errorf("cannot delete active strategy")
}
}
// Check if any trader references this strategy