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-29 15:42:35 +08:00
2026-08-05 15:55:01 +08:00
2025-10-22 16:14:32 +08:00
2024-05-09 14:06:26 +08:00
2025-09-12 09:31:36 +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-05 10:26:42 +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
2025-04-16 15:15:59 +08:00
2024-05-09 14:06:26 +08:00
2026-07-31 14:49:52 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-28 14:29:47 +08:00
2026-07-17 09:26:04 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-28 14:29:43 +08:00
2024-05-09 14:06:26 +08:00
2025-05-14 20:00:04 +08:00
2024-05-09 14:06:26 +08:00
2026-01-21 11:23:29 +08:00
2026-08-08 12:18:45 +08:00
2026-07-16 17:17:21 +08:00
2024-05-09 14:06:26 +08:00
2026-07-30 11:10:48 +08:00
2024-05-09 14:06:26 +08:00
2026-08-05 10:58:29 +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
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-23 16:23:52 +08:00
2024-05-09 14:06:26 +08:00