전략 시간봉 오류 수정
This commit is contained in:
@@ -24,6 +24,7 @@ import { findLogicNode, getIndicatorPeriodLabel } from '../utils/strategyFlowLay
|
||||
import {
|
||||
decodeConditionForEditor,
|
||||
encodeConditionForSave,
|
||||
mergeStartMetaForLoad,
|
||||
addExtraStartSection,
|
||||
hasMultipleStartSections,
|
||||
normalizeStartCombineOp,
|
||||
@@ -500,7 +501,7 @@ export default function StrategyEditorPage({ theme }: Props) {
|
||||
setBuyLayout({
|
||||
positions: stored?.buy.positions ?? {},
|
||||
edgeHandles: stored?.buy.edgeHandles ?? {},
|
||||
startMeta: stored?.buy.startMeta ?? buyDecoded.startMeta,
|
||||
startMeta: mergeStartMetaForLoad(buyDecoded.startMeta, stored?.buy.startMeta),
|
||||
extraStartIds: stored?.buy.extraStartIds?.length ? stored.buy.extraStartIds : buyDecoded.extraStartIds,
|
||||
extraRoots: stored?.buy.extraRoots && Object.keys(stored.buy.extraRoots).length
|
||||
? stored.buy.extraRoots
|
||||
@@ -510,7 +511,7 @@ export default function StrategyEditorPage({ theme }: Props) {
|
||||
setSellLayout({
|
||||
positions: stored?.sell.positions ?? {},
|
||||
edgeHandles: stored?.sell.edgeHandles ?? {},
|
||||
startMeta: stored?.sell.startMeta ?? sellDecoded.startMeta,
|
||||
startMeta: mergeStartMetaForLoad(sellDecoded.startMeta, stored?.sell.startMeta),
|
||||
extraStartIds: stored?.sell.extraStartIds?.length ? stored.sell.extraStartIds : sellDecoded.extraStartIds,
|
||||
extraRoots: stored?.sell.extraRoots && Object.keys(stored.sell.extraRoots).length
|
||||
? stored.sell.extraRoots
|
||||
@@ -538,6 +539,7 @@ export default function StrategyEditorPage({ theme }: Props) {
|
||||
return;
|
||||
}
|
||||
setSaveNameError(false);
|
||||
if (editorMode === 'graph') layoutFlushRef.current?.();
|
||||
const encodedBuy = encodeConditionForSave(buyEditorState);
|
||||
const encodedSell = encodeConditionForSave(sellEditorState);
|
||||
if (!encodedBuy && !encodedSell) { showSnack('조건을 최소 1개 추가하세요', false); return; }
|
||||
|
||||
Reference in New Issue
Block a user