rwadurian/backend
hailin 71eea98ea5 fix(android): 修复连续创建MPC账户失败的bug
问题描述:
- 用户第一次创建MPC账户成功后返回钱包界面
- 再次创建新的MPC账户时,keygen无法自动开始
- 原因是第一次keygen完成后错误地取消了全局会话事件订阅

根本原因分析:
1. startKeygenAsInitiator() 完成时调用了 sessionEventJob?.cancel()
2. sessionEventJob 是在 registerParty() 时启动的全局事件订阅
3. 取消后,新创建的keygen会话无法接收 session_started 事件
4. 导致keygen无法自动触发

对比发现:
- Sign流程在开始前会调用 ensureSessionEventSubscriptionActive() 检查订阅状态
- Keygen流程没有这个检查,存在不一致性

修复方案:
1. 删除 startKeygenAsInitiator() 中的 sessionEventJob?.cancel()
   - 全局订阅不应该在单次操作完成后取消
   - 只在 cancelSession() 和断开连接时才取消

2. 在 createKeygenSession() 开头添加 ensureSessionEventSubscriptionActive()
   - 与sign流程保持一致
   - 即使有其他代码意外取消订阅,也能自我恢复

影响范围:
- TssRepository.kt: startKeygenAsInitiator(), createKeygenSession()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 08:03:28 -08:00
..
.claude refactor: simplify mpc-service to gateway mode 2025-12-06 17:16:14 -08:00
api-gateway fix(kong): remove ws/wss protocols from WebSocket route 2026-01-18 21:36:30 -08:00
infrastructure chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置 2025-12-23 18:35:09 -08:00
mpc-system fix(android): 修复连续创建MPC账户失败的bug 2026-01-27 08:03:28 -08:00
scripts fix(scripts): 修正容器名为 rwa-blockchain-service 2025-12-15 10:34:25 -08:00
services fix(contribution-service): CDC planting_orders 阶段按 order_id 排序处理 2026-01-23 03:41:14 -08:00
.env.windows fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题 2025-12-14 05:05:03 -08:00
docker-compose.windows.yml feat(service-party-app): implement co-sign multi-party signing 2025-12-30 18:36:11 -08:00