Skip to content

feat: 融资切换时保留/恢复预留现金配置 - #114

Merged
Pigbibi merged 1 commit into
mainfrom
feat/save-restore-reserve-on-margin-toggle
Jun 29, 2026
Merged

feat: 融资切换时保留/恢复预留现金配置#114
Pigbibi merged 1 commit into
mainfrom
feat/save-restore-reserve-on-margin-toggle

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

切换融资不再丢失预留现金配置:

  1. 启用融资时:保存当前 reserve 模式和值到 _prevReserve,只改 mode 为 "none",不清空值
  2. 关闭融资时:自动恢复之前的 reserve 模式和值
  3. 切换账户时清除 _prevReserve
用户操作流程:
  reserve=ratio(0.05) → 融资=是 → reserve=none(值保留)
  → 融资=否 → reserve=ratio(0.05) 自动恢复 ✓

125 个测试通过。

🤖 Generated with Claude Code

- reconcileExecutionCashPolicy: 启用融资时保留值和模式到 _prevReserve
- cash-only change handler: 关闭融资时自动恢复之前的预留现金配置
- 切换账户时清除 _prevReserve
- 更新测试: 125 个用例

Co-Authored-By: Claude <noreply@anthropic.com>
@Pigbibi
Pigbibi merged commit 00fbd53 into main Jun 29, 2026
2 of 4 checks passed
@Pigbibi
Pigbibi deleted the feat/save-restore-reserve-on-margin-toggle branch June 29, 2026 15:13
@github-actions

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Review skipped: The Codex review could not be completed.

No Codex service URL or API key configured. Set CODEX_AUDIT_SERVICE_URL, ANTHROPIC_API_KEY, or OPENAI_API_KEY.

Please ensure a human reviewer checks this PR before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant