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
..
2024-05-09 14:06:26 +08:00
2026-08-04 11:33:09 +08:00
2026-08-07 17:20:45 +08:00
2026-07-31 10:35:25 +08:00
2026-08-07 17:53:48 +08:00
2026-07-31 11:10:55 +08:00
2026-08-07 17:53:48 +08:00
2024-05-09 14:06:26 +08:00
2026-08-08 12:18:45 +08:00
2026-04-23 11:25:38 +08:00
2026-04-27 15:34:12 +08:00
2026-05-08 15:09:58 +08:00
2025-09-09 16:45:25 +08:00
2026-08-07 16:46:37 +08:00
2026-04-16 15:12:39 +08:00
2026-08-08 12:18:45 +08:00
2026-07-02 16:14:04 +08:00
2026-04-22 14:46:37 +08:00
2026-07-01 11:01:33 +08:00
2026-04-22 14:46:37 +08:00
2026-04-22 14:46:37 +08:00
2026-07-29 19:01:19 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-23 13:43:43 +08:00
2026-08-05 13:44:17 +08:00
2026-07-29 19:01:19 +08:00
2026-07-29 19:51:42 +08:00
2026-07-29 17:47:13 +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-31 10:35:25 +08:00