전략 시간봉 오류 수정
This commit is contained in:
@@ -9,9 +9,11 @@ import { createPortal } from 'react-dom';
|
||||
import type { Theme } from '../types';
|
||||
import { useDraggablePanel } from '../hooks/useDraggablePanel';
|
||||
import {
|
||||
repairStrategyTimeframes,
|
||||
saveLiveStrategySettings,
|
||||
type LiveStrategySettingsDto,
|
||||
} from '../utils/backendApi';
|
||||
import { warnStrategyTimeframeMismatch } from '../utils/strategyTimeframeSync';
|
||||
import { getKoreanName } from '../utils/marketNameCache';
|
||||
|
||||
interface Strategy {
|
||||
@@ -70,6 +72,15 @@ const LiveStrategyPanel: React.FC<LiveStrategyPanelProps> = ({
|
||||
if (virtualDriven) return;
|
||||
const next: LiveStrategySettingsDto = { ...settings, ...patch, market };
|
||||
const prev = settings;
|
||||
if (next.isLiveCheck && next.strategyId != null) {
|
||||
const ok = await warnStrategyTimeframeMismatch(next.strategyId);
|
||||
if (!ok) return;
|
||||
try {
|
||||
await repairStrategyTimeframes(next.strategyId);
|
||||
} catch {
|
||||
/* repair optional */
|
||||
}
|
||||
}
|
||||
onSettingsChange?.(next);
|
||||
setSaving(true);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user