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 10:06:21 +08:00
2026-08-06 22:00:44 +08:00
2026-07-16 10:03:21 +08:00
2026-08-08 12:18:45 +08:00
2026-07-30 10:06:42 +08:00
2026-07-27 13:18:32 +08:00
2026-07-30 10:15:00 +08:00
2026-07-30 14:46:07 +08:00
2026-07-29 15:22:06 +08:00
2026-08-07 16:46:37 +08:00
2026-07-07 13:26:32 +08:00
2026-07-29 22:33:45 +08:00
2026-07-29 22:33:45 +08:00
2026-08-08 12:18:45 +08:00
2026-07-15 10:18:26 +08:00
2026-07-07 12:30:19 +08:00
2026-07-15 10:18:26 +08:00
2026-07-15 10:18:26 +08:00
2026-07-07 12:30:19 +08:00
2026-07-29 22:33:45 +08:00
2026-08-07 17:44:04 +08:00
2026-08-08 12:18:45 +08:00
2026-07-31 09:07:08 +08:00
2026-08-07 13:46:24 +08:00