hailin
742419c0bf
fix(layout): change sidebar sign link to new CoSignJoin page
...
Change /sign to /cosign/join so participants use the correct page
with auto-join functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:53:51 -08:00
hailin
ebbc483b35
fix(co-sign): use keygen session participants with correct party_index for signing
...
- Fetch keygen session status from backend to get accurate party_index
- Filter out co-managed-party-* (server persistent parties) from signing
- Only temporary/external user parties participate in signing
- For 3-of-5 wallet: 3 user parties sign, 2 co-managed parties are backup only
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 01:12:07 -08:00
hailin
f849a2a9fd
fix(tss-party): increase stdin buffer to 1MB for large TSS messages
...
Default 64KB buffer was truncating large TSS protocol messages in round 3+
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 09:57:04 -08:00
hailin
761e03ebb0
fix(service-party-app): 修复sql.js在打包后找不到模块的问题
...
## 问题
打包后的应用运行时报错 "Cannot find module 'sql.js'"
## 解决方案
### 1. electron-builder 配置
- 添加 `asarUnpack` 配置,将 sql.js 解压到 asar.unpacked 目录
- 将 `node_modules/sql.js/**/*` 添加到 files 列表
### 2. database.ts 修改
- 添加 `getSqlJsWasmPath()` 函数,根据环境返回正确的 WASM 路径
- 开发环境: node_modules/sql.js/dist/sql-wasm.wasm
- 生产环境: app.asar.unpacked/node_modules/sql.js/dist/sql-wasm.wasm
- 使用 locateFile 配置指定 WASM 文件位置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:41:01 -08:00
hailin
3f25424049
fix(service-party-app): 添加bech32类型定义修复编译错误
...
添加 @types/bech32 开发依赖以解决 TypeScript 编译时
找不到 bech32 模块类型声明的问题。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:07:13 -08:00
hailin
c97cd208ab
feat(service-party-app): 添加SQLite存储和Kava区块链集成
...
## 主要变更
### 1. SQLite 本地存储 (sql.js)
- 使用 sql.js (纯 JavaScript SQLite) 替代 better-sqlite3
- 无需本地数据库服务,跨平台兼容
- 表结构: shares, derived_addresses, signing_history, settings
- AES-256-GCM 加密 share 数据,PBKDF2 密钥派生
### 2. Kava 区块链集成
- 新增 kava-tx-service.ts: REST API 交易服务
- 余额查询 (ukava/KAVA)
- 交易构建和广播
- 交易状态查询
- 支持多个备用端点自动切换
### 3. 地址派生
- 新增 address-derivation.ts: 多链地址派生
- 支持 Kava, Cosmos, Osmosis, Ethereum 等链
- 使用 Node.js crypto 替代 @noble/hashes 以解决模块兼容问题
- 手动实现 secp256k1 公钥解压缩
### 4. IPC 处理器
- main.ts: 添加 Kava 相关 IPC 处理器
- preload.ts: 暴露 kava API 给渲染进程
- electron.d.ts: 完整的 TypeScript 类型定义
## 新增文件
- electron/modules/database.ts
- electron/modules/address-derivation.ts
- electron/modules/kava-client.ts
- electron/modules/kava-tx-service.ts
- electron/types/sql.js.d.ts
- src/utils/address.ts
- .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:45:45 -08:00
hailin
b3142387f7
chore(mobile-app): 减少频繁轮询产生的调试日志
...
- 移除合同检查服务的频繁日志输出
- 移除维护状态检查的正常状态日志
- 只在检测到异常状态(维护中、待签署合同)时输出日志
- 减少服务器日志压力
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:54:16 -08:00
hailin
fea01642e7
feat(co-managed-wallet): 添加分布式多方共管钱包创建功能
...
## 功能概述
实现分布式多方共管钱包创建功能,包括 Admin-Web 扩展和 Service-Party 桌面应用。
## 主要变更
### 1. Admin-Web 扩展 (前端)
- 新增 CoManagedWalletSection 组件 (frontend/admin-web/src/components/features/co-managed-wallet/)
- 在授权管理页面添加共管钱包入口卡片
- 实现创建钱包向导: 配置 → 邀请 → 生成 → 完成
- 包含组件: ThresholdConfig, InviteQRCode, ParticipantList, SessionProgress, WalletResult
### 2. Admin-Service 后端 API
- 新增共管钱包领域实体和枚举 (domain/entities/co-managed-wallet.entity.ts)
- 新增 REST 控制器 (api/controllers/co-managed-wallet.controller.ts)
- 新增服务层 (application/services/co-managed-wallet.service.ts)
- 新增 Prisma 模型: CoManagedWalletSession, CoManagedWallet
- 更新 app.module.ts 注册新模块
### 3. Session Coordinator 扩展 (Go)
- 新增会话类型: SessionTypeCoManagedKeygen ("co_managed_keygen")
- 扩展 MPCSession 实体添加 WalletName 和 InviteCode 字段
- 更新 PostgreSQL 和 Redis 适配器支持新字段
- 新增数据库迁移: 008_add_co_managed_wallet_fields
### 4. Service-Party 桌面应用 (新项目)
- 位置: backend/mpc-system/services/service-party-app/
- 技术栈: Electron + React + TypeScript + Vite
- 包含模块:
- gRPC 客户端 (连接 Message Router)
- TSS 处理器 (子进程方式运行 Go TSS 协议)
- 本地加密存储 (AES-256-GCM)
- 页面: Home, Join, Create, Session, Settings
## 修改的现有文件 (便于回滚)
1. backend/mpc-system/services/session-coordinator/domain/entities/mpc_session.go
- 添加 SessionTypeCoManagedKeygen 常量
- 添加 IsKeygen() 方法
- 添加 WalletName, InviteCode 字段
- 更新 ReconstructSession, ToDTO, SessionDTO
2. backend/mpc-system/services/session-coordinator/adapters/output/postgres/session_postgres_repo.go
- 更新 SQL 查询包含 wallet_name, invite_code
- 更新 Save, FindByUUID, FindByStatus 等方法
- 更新 scanSessions, sessionRow
3. backend/mpc-system/services/session-coordinator/adapters/output/redis/session_cache_adapter.go
- 更新 sessionCacheEntry 结构
- 更新 sessionToCacheEntry, cacheEntryToSession
4. backend/services/admin-service/prisma/schema.prisma
- 新增 WalletSessionStatus 枚举
- 新增 CoManagedWalletSession, CoManagedWallet 模型
5. backend/services/admin-service/src/app.module.ts
- 导入并注册共管钱包相关组件
6. frontend/admin-web/src/app/(dashboard)/authorization/page.tsx
- 导入并添加 CoManagedWalletSection
7. frontend/admin-web/src/infrastructure/api/endpoints.ts
- 添加 CO_MANAGED_WALLETS API 端点
## 回滚说明
如需回滚此功能:
1. 回滚数据库迁移: 运行 008_add_co_managed_wallet_fields.down.sql
2. 删除新增文件夹:
- backend/mpc-system/services/service-party-app/
- frontend/admin-web/src/components/features/co-managed-wallet/
- backend/services/admin-service/src/**/co-managed-wallet*
3. 恢复修改的文件到前一个版本
4. 运行 prisma generate 重新生成 Prisma 客户端
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:39:07 -08:00
hailin
1694f37e91
fix(mobile-app): 修复多账号切换后账号列表只显示一个的问题
...
- phone_login_page: 登录成功后添加账号到多账号列表
- import_mnemonic_page: 恢复账号后添加到多账号列表
- sms_verify_page: 短信验证登录后添加账号到多账号列表
问题原因:多个登录入口没有调用 addAccount() 将账号添加到列表
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:12:50 -08:00
hailin
91d3e65289
fix(pdf-generator): 使用page.drawImage在按钮位置绘制签名图片
...
- 从git历史恢复正确的签名嵌入实现
- 获取signature按钮的widget和rectangle位置
- 按字段尺寸等比例缩放签名图片并居中
- 使用page.drawImage()绘制签名,而非setImage()
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 07:54:17 -08:00
hailin
3d42c3602d
fix(reward-service): 权益分配memo显示触发用户ID
...
所有权益类型的memo现在统一显示"来自用户xxx的认种"格式:
- 省团队权益:来自用户xxx的认种
- 省区域权益:来自用户xxx的认种
- 市团队权益:来自用户xxx的认种
- 市区域权益:来自用户xxx的认种
- 社区权益:来自用户xxx的认种
修改前只显示"xx权益已激活",现在与分享权益格式保持一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 04:18:35 -08:00
hailin
21a523518e
feat(mobile-app): 最小提取金额从100改为5绿积分
2025-12-26 04:02:26 -08:00
hailin
78d7e0e637
feat(mobile-app): 流水明细支持显示权益类型和详情
...
- 后端 wallet-service: getMyLedger API 返回 allocationType 字段
- 前端流水明细: 显示权益类型名称(分享权益、省/市区域权益等)
- 新增权益详情弹窗,点击权益记录可查看详细信息
- 兑换页面: "RMB/CNY提现" 改为 "提现"
- 我的团队: "暂无下级成员" 改为 "暂无团队成员"
- 自助申请授权: 隐藏团队链占用区域提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 03:57:35 -08:00
hailin
726e3d0fcf
fix(wallet-service): 修复区域权益分配时 targetId 为用户账户导致的 BigInt 转换错误
...
问题:allocateToRegionAccount 假设 targetId 总是纯数字格式的区域账户,
但实际上当权益分配给授权市/省公司用户时,targetId 是 D 开头的用户账户格式。
修复:判断 targetId 格式
- D 开头:用户账户,直接 findByAccountSequence
- 纯数字:区域账户,使用 getOrCreate
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 02:20:05 -08:00
hailin
c2ff11bd6d
fix(wallet-service): 添加一次性修复脚本 D25122600004->D25122600006 转账
...
- 修复因并发修改导致的冻结余额不足问题
- 自动完成内部转账、记录流水、更新订单状态
- 幂等执行,可安全重启
- 部署成功后请删除 otp/ 目录和相关引用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:50:39 -08:00
hailin
1d817a5be2
fix(blockchain-service): 扩大充值金额字段精度
...
- amount 字段从 Decimal(36,18) 改为 Decimal(78,0) 支持超大金额
- amountFormatted 字段从 Decimal(20,8) 改为 Decimal(36,8)
修复问题:100亿 USDT 充值导致 numeric field overflow 错误
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 18:19:48 -08:00
hailin
e95ac15605
fix(reward-service): 添加奖励分配幂等性检查
...
- distributeRewards 方法添加幂等性检查,防止同一订单重复分配奖励
- distributeRewardsForExpiredContract 方法同样添加幂等性检查
- 通过 findBySourceOrderNo 检查订单是否已分配过奖励
修复问题:recovery job 重复触发导致同一订单奖励被多次分配
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 10:42:01 -08:00
hailin
fd04de8696
fix(mobile-app): 增加合同签署页面重试时间
...
KYC 成功后后端通过 Kafka 异步创建合同任务,可能需要较长时间。
将重试从 5 次/500ms 改为 15 次/2s,总等待时间最多 30 秒。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 07:33:04 -08:00
hailin
8163804f23
fix(contract-signing): 修复合同签署流程的持仓更新时机
...
问题:支付后直接更新持仓和开启挖矿,导致款还在冻结中树就种下去了
修复:
- planting-application.service: 支付时不再更新持仓和开启挖矿
- contract-signing.service: signContract 在事务里同时完成合同+持仓+挖矿
- contract-signing.service: handleExpiredTasks 超时也更新持仓+挖矿(钱扣总部)
- KYCVerifiedEvent 添加 accountSequence 字段
- kyc-verified-event.consumer 直接用事件里的 accountSequence
流程变为:支付冻结 → 签署合同 → [事务: 合同+持仓+挖矿] → 发事件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 06:50:03 -08:00
hailin
0e93d2a343
feat(contract): 使用合同编号代替订单号
...
合同编号格式: accountSequence-yyyyMMddHHmm
例如: 10001-202512251003
修改内容:
- 数据库: 添加 contract_no 字段
- 后端: 聚合根、Repository、Service、PDF生成器支持 contractNo
- 前端: 显示合同编号代替订单号
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 04:58:39 -08:00
hailin
accc043ff0
feat(mobile-app): 添加合同签署 API 详细调试日志
...
- 为 signContract、lateSignContract、markScrollComplete、acknowledgeContract 添加详细日志
- 记录请求参数(签名图片大小、IP、设备信息、位置)
- 记录响应状态码和完整响应数据
- 修复响应解析 bug:正确从 response.data['data'] 提取任务数据
- 增强错误日志,捕获堆栈信息便于调试
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:14:10 -08:00
hailin
94a5c29a09
fix(planting-service): Dockerfile复制tsconfig以支持ts-node seed
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:41:32 -08:00
hailin
8a0bff5010
fix(planting-service): Dockerfile添加自动seed步骤
...
启动时自动运行 prisma db seed 创建合同模板
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:29:46 -08:00
hailin
1d6cbf9335
feat(kyc): 实名认证前检查手机号验证状态
...
- 点击实名认证时检查手机号是否已验证
- 未验证时显示提示弹窗,引导用户先验证手机号
- 实名认证卡片显示"请先验证手机号"提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:00:53 -08:00
hailin
906279ee8a
fix(mobile): 修复用户详情页头像和用户ID显示问题
...
- 修复avatarUrl为SVG数据时的渲染问题,添加SVG检测逻辑
- 修复后端getUserInfoBySequence响应解析,处理包装格式
- 将用户详情弹窗改为全屏页面,提供更好的用户体验
- 新增统计数据卡片展示直推人数、伞下用户、认种数量
- 改进卡片样式,添加图标和阴影效果
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:28:28 -08:00
hailin
b4f685e25f
fix(reward-service): 添加 BatchMonthlyEarningsRequest DTO 的 class-validator 装饰器
...
修复 authorization-service 调用 /internal/monthly-earnings/batch 接口时返回 400 错误的问题。
原因是 reward-service 使用了 ValidationPipe,但 DTO 类缺少必要的验证装饰器。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:22:34 -08:00
hailin
a194fcad72
fix(identity-service): 内部接口改用 accountSequence 查询
...
- identity-service InternalController 改用 accountSequence 批量/单个查询
- 添加 findByAccountSequences 批量查询方法
- authorization-service 调用改为 batchGetUserInfoBySequence/getUserInfoBySequence
- 系统间通信统一使用 accountSequence 作为标识符
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 02:16:12 -08:00
hailin
5fa195e4bc
fix: 修复火柴人排名显示问题
...
1. identity-service: 添加批量获取用户信息内部接口
- 新增 InternalController 提供 POST /internal/users/batch
- repository 添加 findByUserIds 批量查询方法
2. authorization-service: 修复 cumulativeCompleted=0 问题
- assessAndRankRegion 改用 findByAccountSequence 查询团队统计
- referral-service 使用 accountSequence 作为主键
3. mobile-app: 修复火柴人UI显示问题
- 容器边距调整为16px与其他组件一致
- 行高增加到100px避免火柴人重叠
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:48:16 -08:00
hailin
a9d5d297d8
feat(authorization): 火柴人排名查询时实时创建评估记录
...
当查询火柴人排名时,如果没有评估记录,则实时调用 assessAndRankRegion
创建评估记录,避免用户需要等待凌晨1点的定时任务。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:02:23 -08:00
hailin
2d3891740c
feat(authorization): 火柴人排名改为全系统排名,不按区域过滤
...
- 后端新增 findRankingsByMonthAndRoleType 方法查询全系统排名
- 修改 getStickmanRanking 不再按 regionCode 过滤
- 前端简化加载条件,只要有授权就加载排名
- 添加详细调试日志帮助排查问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:20:35 -08:00
hailin
05c8e1d6aa
refactor(authorization): 简化自助申请授权逻辑,移除待审核状态
...
自助申请授权直接生效,无需审核流程:
- 移除 pendingApplications 字段(不再需要待审核列表)
- 简化响应 DTO:applicationId -> authorizationId, 移除 status/reviewedAt/reviewNote
- 新增 benefitsActivated 字段表示是否已激活权益
- 更新前端 SelfApplyAuthorizationResponse 和 UserAuthorizationStatusResponse
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:13:14 -08:00
hailin
0374e2a55c
fix(wallet-service): 修复 identity-client 响应数据解析
...
identity-service 使用响应拦截器将所有响应包装在 { success, data } 结构中。
修复所有方法的响应解析,从 response.data?.valid 改为 response.data?.data?.valid。
影响方法:
- verifyTotp
- isTotpEnabled
- verifyWithdrawSmsCode
- verifyPassword
- resolveAccountSequenceToAddress
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 04:12:48 -08:00
hailin
836bfe7f36
fix(mobile-app): 修复注册后"审核中"状态不更新的问题
...
问题:用户手机号注册成功后,"我的"页面仍显示"创建账号审核中..."
原因:
- set_password_page 注册成功后直接跳转,没有刷新 AuthProvider 状态
- ProfilePage.dispose() 中使用 ref.read() 导致 widget disposed 后报错
修复:
1. set_password_page: 跳转前调用 loadAuthState() 刷新状态
2. profile_page: dispose() 中用 try-catch 包裹 ref.read()
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:59:58 -08:00
hailin
93b623398e
fix: add missing StorageKeys import in profile_page.dart
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:38:29 -08:00
hailin
188075b2be
fix: 短信超时返回成功状态避免前端报错
...
超时情况下短信可能已发送成功,返回 success: true + uncertain: true
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 20:55:31 -08:00
hailin
5fcaeb8794
fix: 恢复 GENESIS 种子用户 migration(正确版本)
...
- 之前误删了 migration 文件
- 重新创建正确的 migration(不包含 created_at 列)
- 添加启动时自动处理失败 migration 的机制
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 22:08:37 -08:00
hailin
959fe93092
feat(identity-service): 添加钱包生成自动重试机制
...
功能:
- 新增 WalletRetryTask 定时任务,每分钟扫描一次
- 自动检测超过 60 秒仍在 generating/deriving 状态的钱包
- 自动检测状态为 failed 的钱包生成
- 幂等重试机制,最多 10 分钟内持续重试
- 记录重试次数和时间戳
技术实现:
- 使用 @nestjs/schedule 的 Cron 装饰器
- 在 UserAccount 聚合根中添加 createWalletGenerationEvent() 方法
- 在 RedisService 中添加 keys() 方法支持模式匹配扫描
- 通过重新发布 UserAccountCreatedEvent 触发幂等重试
相关需求:
- 用户手机号验证成功后立即创建账号
- 钱包生成在后台异步进行
- 失败后自动重试,无需用户感知
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 19:20:55 -08:00
hailin
dbba229c91
fix(reporting-service): 启动 Kafka 微服务消费者以记录真实活动
...
- 在 main.ts 添加 Kafka 微服务连接配置
- 调用 startAllMicroservices() 启动事件消费
- 支持消费 identity/authorization/planting 服务的事件
- 实现仪表板"最近活动"显示真实数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 21:50:36 -08:00
hailin
fd5768f8c5
fix(identity-service): 将 AuthController 和 TotpController 添加到 ApiModule
2025-12-19 19:17:46 -08:00
hailin
943fd9efe9
chore: 提交所有未提交的修改
...
包括:
- admin-service: 系统配置功能
- authorization-service: 自助授权申请功能
- planting-service: 资金分配服务
- reward-service: 奖励计算服务
- admin-web: 用户管理和设置页面
- mobile-app: 授权、认证、路由等功能
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 06:09:43 -08:00
hailin
44f7e16d3a
fix(admin-service): 添加缺失的 uuid 依赖
...
notification.controller.ts 使用了 uuid 生成 ID,但 package.json 缺少依赖
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:57:04 -08:00
hailin
ebb0b85ab5
fix(sentry): 修复 Flutter 代码分析错误
...
- 修复 bootstrap.dart 中 deviceModel 属性访问错误 (使用 brand + model)
- 移除 sentry_navigation_observer.dart 中未使用的 _previousRouteName 字段
- 更新 sentry_service.dart 使用新版 Sentry API (captureFeedback)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 11:04:28 -08:00
hailin
80b74e9877
feat(sentry): 集成 Sentry 自建崩溃收集与错误追踪系统
...
Backend (infrastructure/sentry):
- 添加 Sentry 自建部署 Docker Compose 配置
- 包含 PostgreSQL, Redis, Kafka, ClickHouse, Snuba 等组件
- 添加 Relay (事件网关) 和 Symbolicator (符号化服务) 配置
- 添加部署脚本 deploy.sh 和配置文件
- 更新 infrastructure README 文档
Frontend (mobile-app):
- 添加 sentry_flutter SDK 依赖
- 创建 SentryService 封装类,统一管理崩溃收集
- 创建 SentryConfig 配置类,支持开发/生产环境配置
- 创建 SentryNavigationObserver 自动追踪页面导航
- 创建 SentryDioInterceptor 自动追踪 HTTP 请求
- 在 bootstrap.dart 中集成 Sentry 初始化
- 支持 Flutter 错误和异步错误捕获
- 自动过滤敏感信息 (密码、助记词、私钥等)
- 在登录/登出/切换账号时同步 Sentry 用户信息
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 07:15:13 -08:00
hailin
cc06638e0e
feat(telemetry): 将userId改为userSerialNum字符串格式并完善遥测追踪
...
Backend (presence-service):
- 将EventLog.userId从BigInt改为String类型,存储userSerialNum(如D25121400005)
- 更新Prisma schema,userId字段改为VarChar(20)并添加索引
- 更新心跳相关命令和事件,统一使用userSerialNum字符串
- 添加数据库迁移文件
- 更新相关单元测试和集成测试
Frontend (mobile-app):
- TelemetryEvent新增toServerJson()方法,格式化为后端API期望的格式
- AccountService登录/恢复时设置TelemetryService的userId
- MultiAccountService切换账号时同步更新TelemetryService的userId
- 退出登录时清除TelemetryService的userId
- AuthProvider初始化时设置userId
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:55:25 -08:00
hailin
09e66cef10
refactor: 多项UI优化和品牌更名
...
- 品牌更名: 将"榴莲女皇"全部替换为"榴莲皇后"(前端+后端共15处)
- 导航优化: 将"交易"Tab改名为"兑换"
- 创建钱包页: 添加返回按钮,可返回向导页第5页(仅账号未创建时显示)
- 兑换页面: 禁用"一键结算"和"卖出DST"按钮,提款按钮在余额为0时禁用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:43:47 -08:00
hailin
a7c36b5ee1
fix(referral): 使用JWT中的accountSequence替代userId查询
...
- JwtAuthGuard解析accountSequence字段放入request.user
- getMyReferralInfo和getMyDirectReferrals改用accountSequence
- 修复referral-service与identity-service用户ID不匹配问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 05:27:22 -08:00
hailin
6ef8824ef0
fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 05:05:03 -08:00
hailin
4be9c1fb82
refactor!: 重构账户序列号格式 (BREAKING CHANGE)
...
将 accountSequence 从数字类型改为字符串类型,新格式为:
- 普通用户: D + YYMMDD + 5位序号 (例: D2512120001)
- 系统账户: S + 10位序号 (例: S0000000001)
主要变更:
- identity-service: AccountSequence 值对象改为字符串类型
- identity-service: 序列号生成器改为按日期重置计数
- 所有服务: Prisma schema 字段类型从 BigInt/Int 改为 String
- 所有服务: DTO、Command、Event 中的类型定义更新
- Flutter 前端: 相关数据模型类型更新
涉及服务:
- identity-service (核心变更)
- referral-service
- authorization-service
- wallet-service
- reward-service
- blockchain-service
- backup-service
- planting-service
- mpc-service
- admin-service
- mobile-app (Flutter)
注意: 此为破坏性变更,需要清空数据库并重新运行 migration
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 09:11:18 -08:00
hailin
582828b8be
fix(authorization): activate benefit when assessment target is exactly reached
...
When tree count + current team count equals initial target exactly,
the benefit was not being activated. Now properly handles three cases:
- afterPlantingCount < target: still in assessment, no activation
- afterPlantingCount === target: reached target, activate benefit
- afterPlantingCount > target: exceeded target, split rewards & activate
Applied to community, province team, and city team reward distribution.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 20:29:15 -08:00
hailin
41af5ef3a3
fix(mpc/backup): add accountSequence to backup share storage
...
- mpc-service: add accountSequence param to StoreBackupShareParams
- mpc-service: pass accountSequence when calling backup-service
- backup-service: add logging for store request success/failure
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 15:06:00 -08:00
hailin
034fb53674
refactor: use accountSequence as unified user identifier across all services
...
- planting-service: extract accountSequence from JWT, pass to referral-service
- referral-service: query by accountSequence instead of userId
- reward-service: add accountSequence field to schema and all layers
- wallet-service: prioritize accountSequence lookup over userId
- authorization-service: change userId from String to BigInt, add accountSequence
This change ensures consistent cross-service user identification using
accountSequence (8-digit unique business ID) instead of internal database IDs.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:55:03 -08:00
hailin
68182fd0a3
feat(referral): add personal/team planting counts to direct referral list
...
- Backend: batch query TeamStatistics to get each direct referral's
personalPlantingCount and teamPlantingCount
- Updated DTO and query interfaces with new fields
- Frontend: parse and display "个人/团队" counts in profile page
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 05:57:46 -08:00
hailin
0546cff708
revert: restore Kafka session timeout to 5 minutes
2025-12-09 03:28:28 -08:00
hailin
429f8d5991
Revert "fix(mpc-service): don't block startup on Kafka consumer rebalance"
...
This reverts commit c924d3aad2 .
2025-12-09 03:26:05 -08:00
hailin
c924d3aad2
fix(mpc-service): don't block startup on Kafka consumer rebalance
2025-12-09 03:25:07 -08:00
hailin
c1670d2439
feat(mnemonic): add recovery mnemonic generation and backup confirmation
...
Backend (blockchain-service):
- Add RecoveryMnemonicAdapter to generate 12-word BIP39 mnemonic
- Generate mnemonic when wallet addresses are derived (linked to public key)
- Include mnemonic in WalletAddressCreated event
Backend (identity-service):
- Add RecoveryMnemonic table with revocation/replacement support
- Save encrypted mnemonic to database on WalletAddressCreated event
- Add PUT /user/mnemonic/backup API to mark mnemonic as backed up
- Clear plaintext mnemonic from Redis after backup confirmation
Frontend (mobile-app):
- Update markMnemonicBackedUp() to call backend API
- Fix verify_mnemonic_page validation logic:
- Checkbox checked → pass directly
- Not checked → must select correct word
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:32:10 -08:00
hailin
f1390a85c8
fix(mobile-app): skip backup mnemonic page for MPC wallet mode
...
- Fix mnemonic parsing: empty string "" now correctly becomes empty list
- MPC mode (no mnemonic) skips backup page and navigates directly to home
- Apply fix to both initial load and polling logic
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:00:38 -08:00
hailin
8e9eb0ef19
fix(identity): add device_info columns to user_devices migration
...
- Add device_info JSONB column for storing complete device info
- Add platform, device_model, os_version, app_version columns
- Add screen_width, screen_height, locale, timezone columns
- Add idx_platform index
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:42:55 -08:00
hailin
29f2dc0524
fix(identity): remove address from updateProfile and fix deviceInfo type
...
- Remove dto.address parameter from updateProfile controller
- Remove address property from updateProfile service
- Fix deviceInfo JSON serialization for Prisma InputJsonValue type
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:29:51 -08:00
hailin
79345a20cf
fix(identity): update migration to TEXT avatar and remove province/city/address
...
- Change avatar_url column from VARCHAR(500) to TEXT
- Remove province_code, city_code, address columns from user_accounts
- Remove idx_province_city index
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:28:09 -08:00
hailin
2705812826
refactor(identity): remove province/city/address fields
...
- Remove provinceCode, cityCode, address from UserAccount aggregate
- Remove ProvinceCode, CityCode value objects
- Remove UserLocationUpdatedEvent domain event
- Update Prisma schema to drop province/city/address columns
- Update repository, mapper, handlers, services and DTOs
- Clean up tests and factory files
Province/city should belong to adoption-service as transaction data,
not identity-service user data.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:23:26 -08:00
hailin
fbec0b9112
feat(identity): store complete deviceInfo JSON from frontend
...
- Add deviceInfo JSON field to UserDevice table (Prisma schema)
- Update DeviceInfo value object to use deviceInfo instead of HardwareInfo
- Update repository to save complete JSON with redundant fields for queries
- Update mapper to read deviceInfo from database
- Update aggregate and handlers to pass deviceInfo through
- Allow any fields in DeviceNameInput interface with index signature
100% preserve original device info JSON from frontend without extraction
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:08:37 -08:00
hailin
39804aa981
fix(mobile-app): update share link domain to rwaapi.szaiai.com
...
Changed invite share URLs from rwa-durian.app to rwaapi.szaiai.com
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 21:15:55 -08:00
hailin
747e4ae8ef
refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
...
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination
This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer
db8350b2f5
fix(identity-service): 更换 npm 镜像为华为云解决超时问题
...
- npmmirror CDN 超时 (EIDLETIMEOUT)
- 改用 mirrors.huaweicloud.com/repository/npm/
- 添加 disturl 配置加速 node 二进制下载
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 18:45:18 -08:00
Developer
a966d71fa0
.
2025-11-30 06:44:57 -08:00
Developer
083db83c96
.
2025-11-29 19:22:42 -08:00