직접입력값 평가오류
This commit is contained in:
@@ -5,6 +5,7 @@ import type { LogicNode } from './strategyTypes';
|
||||
import type { StrategyDto } from './backendApi';
|
||||
import { extractVirtualConditions } from './virtualStrategyConditions';
|
||||
import { decodeConditionForEditor, encodeConditionForSave } from './strategyConditionSerde';
|
||||
import { normalizeLogicRootForPersistence } from './strategyConditionNormalize';
|
||||
import type { StrategyFlowLayoutStore } from './strategyEditorLayoutStorage';
|
||||
|
||||
export function asLogicNode(raw: unknown): LogicNode | null {
|
||||
@@ -34,8 +35,8 @@ export function hydrateStrategyDto(strategy: StrategyDto): StrategyDto {
|
||||
const sell = asLogicNode(strategy.sellCondition);
|
||||
let next: StrategyDto = {
|
||||
...strategy,
|
||||
buyCondition: buy ?? undefined,
|
||||
sellCondition: sell ?? undefined,
|
||||
buyCondition: normalizeLogicRootForPersistence(buy) ?? buy ?? undefined,
|
||||
sellCondition: normalizeLogicRootForPersistence(sell) ?? sell ?? undefined,
|
||||
};
|
||||
|
||||
if (extractVirtualConditions(next).length > 0) return next;
|
||||
|
||||
Reference in New Issue
Block a user