Commit Graph

3 Commits

Author SHA1 Message Date
hailin 613f85f1c2 fix(android): 修复keygen进度显示和参与者列表不完整的问题
问题1: 进度显示问题
- 协议进度永远卡在0/9直到完成
- 原因: 进度只在发送出站消息时更新,接收消息时不更新
- 修复: 在SendIncomingMessage中也提取轮次并调用OnProgress

问题2: totalRounds硬编码
- UI硬编码totalRounds=9,但keygen只有4轮
- 修复: 使用Go库传来的动态totalRounds值
- keygen默认4轮,sign默认9轮

问题3: 参与者列表不完整
- 只显示"参与方 1",缺少其他参与者
- 原因: 参与者通过participant_joined事件逐个添加
- 后加入者不会收到之前参与者的事件
- 修复: 在session_started时根据thresholdN/T初始化完整列表

修改文件:
- tsslib.go: SendIncomingMessage添加进度回调
- MainViewModel.kt: 添加_totalRounds, 初始化完整参与者列表
- MainActivity.kt: 使用动态totalRounds

注意: 需要重新编译tsslib.aar才能生效

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 08:36:25 -08:00
hailin 2365a50b1b feat(tss): add real-time round progress from msg.Type() parsing
Extract current round number from tss-lib message type string using
regex pattern `Round(\d+)`. This enables real-time progress updates
(1/4, 2/4... for keygen, 1/9, 2/9... for signing) instead of only
showing completion status.

Changes across all three platforms:
- tss-wasm/main.go: Add extractRoundFromMessageType() and call
  OnProgress with parsed round on each outgoing message
- service-party-android/tsslib/tsslib.go: Same implementation for
  Android gomobile binding
- service-party-app/tss-party/main.go: Same implementation for
  Electron subprocess, with isKeygen parameter to distinguish
  keygen (4 rounds) vs signing (9 rounds)

Safe fallback: Returns 0 if parsing fails, which doesn't affect
protocol execution - only UI display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 22:41:51 -08:00
hailin 7b6d6de801 feat(android): add Android TSS Party app with full API implementation
Major changes:
- Add complete Android app (service-party-android) with Jetpack Compose UI
- Implement real account-service API calls for keygen and sign sessions:
  - POST /api/v1/co-managed/sessions (create keygen session)
  - GET /api/v1/co-managed/sessions/by-invite-code/{code} (validate invite)
  - POST /api/v1/co-managed/sessions/{id}/join (join keygen session)
  - POST /api/v1/co-managed/sign (create sign session)
  - GET /api/v1/co-managed/sign/by-invite-code/{code} (validate sign invite)
  - POST /api/v1/co-managed/sign/{id}/join (join sign session)
- Add QR code generation and scanning for session invites
- Remove password requirement (use empty string)
- Add floating action button for wallet creation
- Add network type aware explorer links (mainnet/testnet)

Network configuration:
- Change default network to Kava mainnet for both Electron and Android apps
- Electron: main.ts, transaction.ts, Settings.tsx, Layout.tsx
- Android: Models.kt (NetworkType.MAINNET default)

Features:
- Full TSS keygen and sign protocol via gomobile bindings
- gRPC message routing for multi-party communication
- Cross-platform compatibility with service-party-app (Electron)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:27:29 -08:00