Merge pull request #435 from zhouyongyou/fix/trader-config-overwrite

fix(margin): correct position sizing formula to prevent insufficient margin errors
This commit is contained in:
Icyoung
2025-11-05 16:08:18 +08:00
committed by GitHub

View File

@@ -101,8 +101,8 @@ export function TraderConfigModal({
}) })
} }
// 确保旧数据也有默认的 system_prompt_template // 确保旧数据也有默认的 system_prompt_template
if (traderData && !traderData.system_prompt_template) { if (traderData && traderData.system_prompt_template === undefined) {
setFormData((prev) => ({ setFormData(prev => ({
...prev, ...prev,
system_prompt_template: 'default', system_prompt_template: 'default',
})) }))