hjhan
68a3f0b4fa
debug(swap)+test: 平仓利息 otcdebug 埋点 + 修复3个前端红测试
1) otcdebug 埋点(unwindSwapTrade.js, 仅 ?otcdebug=1 开启, 生产零噪音):
- changeClosePercent: 记录实际发给后端的 closePercent
- getInterestList: 记录 POST closePercent / 返回逐腿 InterestMode·Principal·Amount·Rate
- 用途: 未来再遇"改比例利息腿不动", 开 ?otcdebug=1 即可定位前端没传对还是后端没缩放
2) 修复分支上既有3个红测试(均为配置/生产已改、测试未跟上或契约过时):
- swapPrecisionConfig.test.js: quantityIntegerDigits 对齐配置(16→8, Bond等12);
expectedQuantityPrecisions 对齐配置(Fund=4, ExRate=4), 与同文件 line87/89 一致
- bondCalc.integration.test.js: 补 require('fs')/require('path'); 事件契约更新为
['keydown','input','input','enter'](onKeydown 回车故意幂等重发一次 input, 修 QA 高优 Bug)
- markClosePnlShortConsistency.test.js: 空头一致性测试由 RED 转 GREEN(income 已补 longRatio);
CASE deliveryPrice 105→1.05 与 GOLD 的 105*scale(0.01) 单位对齐
引入溯源: 固定值腿缩放缺陷见 d1badfe4; 精度配置 16→8 来自 0672dbbc(张名锐);
红测试为已知缺口记录(用户 hjhan)。
2026-08-08 12:18:45 +08:00
..
2026-07-30 14:46:07 +08:00
2026-07-28 14:50:01 +08:00
2026-08-06 17:45:43 +08:00
2026-08-07 17:44:04 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-08-07 17:44:04 +08:00
2024-06-04 18:19:49 +08:00
2026-08-06 12:41:30 +08:00
2026-08-06 12:41:30 +08:00
2026-08-07 17:57:16 +08:00
2026-08-07 11:16:43 +08:00
2025-04-23 15:01:54 +08:00
2026-08-07 17:57:16 +08:00
2026-07-28 14:29:23 +08:00
2024-05-09 14:06:26 +08:00
2026-07-14 09:46:54 +08:00
2025-10-15 18:09:23 +08:00
2024-05-09 14:06:26 +08:00
2026-08-06 12:41:30 +08:00
2026-08-08 12:18:45 +08:00