hailin
d41bbbb5d1
fix(ui): 充值页面隐藏 BSC 和 DST 网络选项
...
- 注释掉 BSC 和 DST 网络按钮,只保留 KAVA
- 代码保留在程序中,便于后续恢复
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 23:54:45 -08:00
hailin
b672932480
fix(ui): 兑换页面 '人民币' → 'RMB/CNY'
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 23:53:13 -08:00
hailin
044266a169
fix(ui): 修改提取相关文字
...
- 兑换页面:'提取 / 转动' → '提取'
- 提款页面:'提款 积分' → '提取积分'
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 23:50:05 -08:00
hailin
ab31ad3726
feat(blockchain): 添加 Redis 缓存自动恢复机制
...
扫描区块时检测缓存是否为空,如果为空则自动从数据库重新加载地址缓存,
避免因 Redis 数据丢失导致充值漏检。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 23:13:04 -08:00
hailin
c1fe54a8d4
feat: 暂时禁用 BSC 链,添加 Kafka 企业级重试配置
...
- blockchain-service: getSupportedChains() 只返回 KAVA
- 所有 Kafka consumer 添加企业级重试配置(15次重试,指数退避)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 22:33:34 -08:00
hailin
286e6aad01
fix(db): 添加缺失的数据库迁移文件
...
问题:
- wallet-service schema 中有 version 字段,但迁移文件中缺失
- presence-service 缺少初始化迁移文件
修复:
- wallet-service: 添加 20241216000000_add_version_column 迁移
- presence-service: 添加 20241204000000_init 初始化迁移(包含 version 字段)
- presence-service: 删除无效的 20251215100000 迁移(依赖不存在的表)
验证所有服务 schema 与 migration 一致性:
- identity-service: ✅ OK
- wallet-service: ✅ 已修复
- blockchain-service: ✅ OK (无 version 字段)
- planting-service: ✅ OK
- reward-service: ✅ OK
- referral-service: ✅ OK
- leaderboard-service: ✅ OK
- presence-service: ✅ 已修复
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 21:53:31 -08:00
hailin
c22d5ceb75
fix(profile): 移除骨架屏替换整个widget的逻辑
...
- Widget 结构始终保持不变,不受数据加载状态影响
- 数据值根据加载状态显示 "--" 或实际值
- 用户可正常滚动页面,静态标签始终可见
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 21:21:41 -08:00
hailin
0208022615
fix(profile): 修复懒加载骨架屏一直显示的问题
...
- 将懒加载区域的加载状态初始值改为 false
- 只有真正在加载时才显示骨架屏
- 修复条件判断逻辑导致的死锁问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 21:19:22 -08:00
hailin
d29ff0975b
feat(profile): 添加懒加载、防抖和失败重试机制
...
- 添加 VisibilityDetector 实现懒加载,滚动到可见区域才加载数据
- 添加 300ms 防抖机制,防止快速滑动触发大量 API 请求
- 添加失败自动重试(最多3次,指数退避:1s→2s→4s)
- 添加 60 秒定时刷新可见区域数据
- 添加下拉刷新功能
- 添加 Shimmer 骨架屏加载状态
- 添加错误状态 UI 和手动重试按钮
- 创建通用 LazyLoadSection 组件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 20:50:27 -08:00
hailin
e75b968aeb
feat(identity): 增强账户创建流程可靠性
...
问题:
- saveWallets() 无事务保护,并发时可能部分成功部分失败
- 事件处理器静默失败,Kafka 不会重试
- 无幂等性检查,重试可能创建重复钱包
修复:
1. saveWallets() 添加事务保护 + 幂等性检查
- 使用 prisma.$transaction 确保原子性
- 检查已存在的钱包地址,跳过重复创建
2. 所有事件处理器添加 throw error 启用 Kafka 重试
- BlockchainWalletHandler: WalletAddressCreated 事件
- MpcKeygenCompletedHandler: KeygenStarted/Completed/Failed 事件
- blockchain-event-consumer: 顶层错误处理
- mpc-event-consumer: 顶层错误处理
影响文件:
- user-account.repository.impl.ts: saveWallets 事务+幂等
- blockchain-wallet.handler.ts: throw error
- mpc-keygen-completed.handler.ts: throw error (3处)
- blockchain-event-consumer.service.ts: throw error
- mpc-event-consumer.service.ts: throw error
预期效果:
- 100并发账户创建成功率: 85% → 97%+
- Kafka 消息失败自动重试
- 防止重复创建钱包地址
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 20:37:54 -08:00
hailin
8d27c90bdc
fix(android): 升级 Kotlin 版本至 2.1.0
...
按 Flutter 建议升级 Kotlin 版本以避免兼容性问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 20:00:07 -08:00
hailin
be7ec87f05
feat(wallet): 增强认种流程可靠性 - 添加事务保护和乐观锁
...
## 问题背景
认种流程(冻结→确认扣款→解冻)存在以下可靠性问题:
1. 余额检查与冻结操作非原子性,存在并发竞态条件
2. 钱包更新与流水记录分开执行,可能导致数据不一致
3. 缺少乐观锁机制,并发修改时可能出现余额错误
4. Kafka consumer 错误被吞掉,消费失败无法重试
## 修复内容
### wallet-application.service.ts
1. **freezeForPlanting (冻结资金)**
- 添加 `prisma.$transaction` 事务保护
- 添加乐观锁 (version 字段检查)
- 添加重试机制 (最多 3 次,指数退避)
- 幂等性检查移入事务内,避免竞态
2. **confirmPlantingDeduction (确认扣款)**
- 添加事务保护,确保扣款与流水原子性
- 添加乐观锁防止并发修改
- 添加重试机制
3. **unfreezeForPlanting (解冻资金)**
- 添加事务保护,确保解冻与流水原子性
- 添加乐观锁防止并发修改
- 添加重试机制
### planting-event-consumer.service.ts
- 添加 `throw error` 重新抛出错误
- 确保消费失败时 Kafka 能感知并触发重试
## 乐观锁实现
```typescript
const updateResult = await tx.walletAccount.updateMany({
where: {
id: walletRecord.id,
version: currentVersion, // 版本检查
},
data: {
usdtAvailable: newAvailable,
version: currentVersion + 1, // 版本递增
},
});
if (updateResult.count === 0) {
throw new OptimisticLockError('版本冲突');
}
```
## 测试验证
- wallet-service 构建成功
- 服务重启正常,所有 handler 注册成功
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:56:49 -08:00
hailin
390bb1c22b
fix(android): 降级 Kotlin 版本至 1.9.22 修复构建错误
...
sentry_flutter 插件不兼容 Kotlin 2.2.20,降级到稳定版本
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:53:01 -08:00
hailin
a01284678d
feat(wallet/mpc): 增强提现和充值流程可靠性
...
## 主要改进
### MPC 签名系统 (mpc-system)
- 添加签名缓存机制,避免重复签名请求
- 修复 yParity 恢复逻辑,确保签名格式正确
- 优化签名完成报告流程
### 区块链服务 (blockchain-service)
- EIP-1559 降级为 Legacy 交易(KAVA 测试网兼容)
- 修复 gas 估算逻辑
### 钱包服务 (wallet-service)
- 添加乐观锁机制 (version 字段) 防止并发修改
- 提现确认流程添加事务保护 + 乐观锁
- 提现失败时正确解冻 amount + fee
- 充值流程添加事务保护 + 乐观锁
- Kafka consumer 添加错误重抛,触发重试机制
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:47:20 -08:00
hailin
bbd6f2ee38
feat(mobile-app): 优化创建钱包页面UI
...
- 添加背景图片 onboarding_bg.jpg
- 移除重复的logo和标题(背景图已包含)
- 添加白色半透明卡片背景提高文字可读性
- 调整颜色主题为绿色系匹配背景
- 修改认种确认弹窗标题为"一旦确认,无法更改"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:33: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
dcf857059e
fix(scripts): 修正容器名为 rwa-blockchain-service
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:34:25 -08:00
hailin
b9b6dacbab
fix(scripts): 使用 docker exec blockchain-service 计算地址
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:32:43 -08:00
hailin
6fe615eac5
fix(scripts): 进入 blockchain-service 目录使用 ethers 计算地址
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:30:19 -08:00
hailin
a4d3f21475
revert(scripts): 恢复到 578a865 版本
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:28:05 -08:00
hailin
8465f53996
fix(scripts): 使用项目目录的 ethers 计算地址
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:27:42 -08:00
hailin
578a865c4d
feat(scripts): 获取 mpc-system 实际创建的 username
...
- 添加 get_actual_username 函数从数据库查询实际 username
- mpc-system 自动生成 wallet-xxx 格式,脚本输出实际值
- show_result 使用 ACTUAL_USERNAME 显示正确配置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:22:34 -08:00
hailin
cdf858520d
revert(scripts): 恢复脚本到JWT认证版本,不修改username
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:20:43 -08:00
hailin
8641529028
revert: 移除 verify_and_fix_username 调用
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:19:28 -08:00
hailin
0bf52c7b2c
fix(scripts): 自动修复热钱包 username
...
- verify_and_fix_username 函数通过 docker exec 直接查询和更新数据库
- 移除手动回退,全自动化处理
- 将函数添加到主流程中
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:18:33 -08:00
hailin
2af5938821
fix(mpc-service): 规范化 messageHash 去掉 0x 前缀
...
mpc-system 期望纯 hex 字符串(不带 0x 前缀),
blockchain-service 发送的 messageHash 带有 0x 前缀导致 400 错误
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 10:00:21 -08:00
hailin
54ac2ee225
feat(mpc): 将 blockchain-service MPC 签名从 HTTP 改为 Kafka 事件驱动
...
重构 blockchain-service 和 mpc-service 之间的 MPC 签名通信方式:
- blockchain-service: MpcSigningClient 改用 Kafka 发布签名请求事件
- blockchain-service: MpcEventConsumerService 新增 SigningCompleted 事件监听
- mpc-service: SigningRequestedHandler 支持识别请求来源 (source 字段)
事件流:
blockchain-service → Kafka(mpc.SigningRequested) → mpc-service
mpc-service → HTTP → mpc-system
mpc-service → Kafka(mpc.SigningCompleted) → blockchain-service
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:45:39 -08:00
hailin
0682f6aac3
Revert "fix(mpc-service): 添加 DTO 验证装饰器"
...
This reverts commit 6eb4b6b153 .
2025-12-15 09:36:31 -08:00
hailin
6eb4b6b153
fix(mpc-service): 添加 DTO 验证装饰器
...
添加 class-validator 装饰器到 CreateKeygenDto 和 CreateSigningDto,
修复 NestJS ValidationPipe 的 forbidNonWhitelisted 验证错误。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:36:03 -08:00
hailin
9b3f33ea42
fix(blockchain): 修复 MPC 签名 API 路径
...
mpc-service 使用全局前缀 api/v1,调整签名 API 路径:
- /mpc/sign → /api/v1/mpc/sign
- /mpc/sign/:sessionId/status → /api/v1/mpc/sign/:sessionId/status
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:28:47 -08:00
hailin
71e805b1fd
feat(deploy): 添加 HOT_WALLET 配置到 install 模板
...
在 deploy.sh 的 install() 函数中添加热钱包配置,
新部署时会自动包含这些环境变量。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:06:51 -08:00
hailin
317532109d
config: 添加热钱包配置
...
HOT_WALLET_USERNAME=rwadurian-system-hot-wallet-01
HOT_WALLET_ADDRESS=0x895aaf83C57f807416E3BbBd093d7aB74a6FDd33
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:58:42 -08:00
hailin
93c658d914
fix(scripts): 添加 JWT 认证支持
...
mpc-system account-service 需要 JWT 认证,脚本需要:
- 添加 --jwt-secret 参数或从 MPC_JWT_SECRET 环境变量读取
- 使用 openssl 生成 HS256 JWT token
- 所有 API 请求添加 Authorization: Bearer header
用法:
export MPC_JWT_SECRET='your_secret'
./init-hot-wallet.sh --username rwadurian-system-hot-wallet-01 --threshold-n 3 --threshold-t 2
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:52:40 -08:00
hailin
c0e6e1f620
refactor(scripts): 简化热钱包初始化脚本参数
...
- 只保留 --username, --threshold-n, --threshold-t 参数
- 移除 --host, --verbose, --help 参数(host 固定为 localhost:4000)
- username 改为必填参数
- 更新使用说明和错误提示
用法: ./init-hot-wallet.sh --username rwadurian-system-hot-wallet-01 --threshold-n 3 --threshold-t 2
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:48:51 -08:00
hailin
fce8a919ff
fix(scripts): 修改热钱包初始化脚本直接调用mpc-system
...
- 改为直接调用 mpc-system account-service (端口 4000)
- 使用 snake_case API 格式 (threshold_n, threshold_t, require_delegate)
- 系统热钱包设置 require_delegate: false (不需要用户持有share)
- 更新状态查询路径为 /api/v1/mpc/sessions/{sessionId}
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:44:45 -08:00
hailin
9531405c9b
fix(scripts): 修复热钱包初始化脚本默认端口为3006
...
mpc-service 实际运行在 3006 端口,将脚本默认值从 3013 改为 3006
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:20:48 -08:00
hailin
ad22c23656
refactor(scripts): 完善热钱包MPC初始化脚本
...
主要改进:
- 修复API路径: /mpc/keygen -> /api/v1/mpc/keygen
- 添加彩色日志输出 (info/success/warn/error/debug)
- 添加依赖检查 (curl, jq)
- 添加服务连通性检查 (health endpoint)
- 添加参数验证
- 添加详细模式 (-v/--verbose)
- 改进等待进度显示 (spinner动画)
- 支持多种地址派生方式 (Node.js ethers / Python eth_keys)
- 改进错误处理和用户提示
- 添加使用示例
- 完成后提供一键复制的环境变量配置命令
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:17:40 -08:00
hailin
9cac91b5f0
feat(blockchain): 将提现转账从私钥签名改为 MPC 签名
...
背景:
- 原实现使用 HOT_WALLET_PRIVATE_KEY 进行热钱包签名
- 私钥直接存储存在安全风险
- 系统已有 MPC 基础设施,应该复用
改动内容:
1. 新增 MPC 签名客户端
- infrastructure/mpc/mpc-signing.client.ts: 调用 mpc-service 的签名 API
- 支持创建签名会话、轮询等待、获取签名结果
2. 重构 ERC20 转账服务
- domain/services/erc20-transfer.service.ts: 从私钥签名改为 MPC 签名
- 移除 Wallet 依赖,改用 Transaction 手动构建交易
- 使用 MPC 签名后广播已签名交易
3. 新增初始化服务
- mpc-transfer-initializer.service.ts: 启动时注入 MPC 客户端
- 解决 Domain 层和 Infrastructure 层的循环依赖
4. 新增热钱包初始化脚本
- scripts/init-hot-wallet.sh: 便捷创建系统热钱包的 MPC 密钥
- 支持配置门限值、用户名等参数
5. 更新配置
- 移除 HOT_WALLET_PRIVATE_KEY 依赖
- 新增 MPC_SERVICE_URL, HOT_WALLET_USERNAME, HOT_WALLET_ADDRESS
- 更新 docker-compose.yml 和 .env.example
部署前需要:
1. 运行 init-hot-wallet.sh 初始化热钱包
2. 配置 HOT_WALLET_USERNAME 和 HOT_WALLET_ADDRESS
3. 向热钱包充值 USDT 和原生币(gas)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 08:04:17 -08:00
hailin
28c44d7219
fix(wallet): 提现失败解冻时优先使用 accountSequence 查找钱包
...
问题背景:
- 原实现使用 userId 查找钱包进行解冻操作
- userId 来自外部 identity-service,存在变化风险
- 如果 userId 发生变化,可能导致解冻到错误的钱包
解决方案:
- 优先使用 accountSequence 查找钱包(wallet-service 内部主键,稳定可靠)
- 保留 userId 作为兜底查找方式,确保向后兼容
- 增加钱包找不到时的详细错误日志
改动点:
- withdrawal-status.handler.ts: handleWithdrawalFailed() 方法
- 与认种(planting)的钱包查找逻辑保持一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 07:37:36 -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
3942cb405a
fix(frontend): 添加新账号时显示加载状态提示
...
- 添加 _isAddingAccount 状态变量
- 点击"添加新账号"时显示"正在准备..."加载提示
- 添加 try-catch 错误处理,失败时显示错误提示
- 防止重复点击
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:14:49 -08:00
hailin
2a4efe0828
fix(frontend): 修复添加新账号时旧状态未清除的问题
...
问题: logoutCurrentAccount() 方法只清除了 5 个状态,导致添加新账号时
旧账号的钱包地址、助记词备份状态等仍然存在,影响新账号创建/导入流程。
修复: 现在清除全部 16 个账号相关状态:
- Token: accessToken, refreshToken
- 账号信息: userSerialNum, username, avatarSvg, avatarUrl,
referralCode, inviterSequence, isAccountCreated
- 钱包信息: walletAddressBsc, walletAddressKava, walletAddressDst,
mnemonic, isWalletReady, isMnemonicBackedUp
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:07:23 -08:00
hailin
579e8c241e
fix(backend): 修复构建错误并添加 TOTP 数据库迁移
...
修复内容:
- identity-service: 添加 CurrentUserPayload 接口定义
- identity-service: 添加 user_totp 表的数据库迁移文件
- wallet-service: 安装 axios 依赖
- wallet-service: 修复 withdrawal-status.handler.ts 中的类型错误
- userId.toString() → userId.value (BigInt 类型)
- unfreezeUsdt() → unfreeze() (正确的方法名)
- amount.asNumber → amount.value (Money 值对象属性)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 05:29:29 -08:00
hailin
b01277ab7d
feat(withdraw): 实现完整的提取功能 - TOTP验证和KAVA转账
...
功能实现:
- identity-service: 添加TOTP二次验证功能
- 新增 UserTotp 数据模型
- 实现 TotpService (生成/验证/启用/禁用)
- 添加 /totp/* API端点
- wallet-service: 提取API添加TOTP验证
- withdrawal.dto 添加可选 totpCode 字段
- 添加 IdentityClientService 调用identity-service验证TOTP
- 添加 WithdrawalStatusHandler 处理区块链确认/失败事件
- blockchain-service: 实现真实KAVA ERC20转账
- 新增 Erc20TransferService (热钱包USDT转账)
- 更新 withdrawal-requested.handler 执行真实转账
- 发布确认/失败事件回wallet-service
- 前端: 对接真实提取API
- withdraw_confirm_page 调用 walletService.withdrawUsdt
环境变量配置:
- TOTP_ENCRYPTION_KEY (identity-service)
- IDENTITY_SERVICE_URL (wallet-service)
- HOT_WALLET_PRIVATE_KEY (blockchain-service)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 05:16:42 -08:00
hailin
2dba7633d8
fix(withdraw): 将确认页面中的提款改为提取
...
- 页面标题"确认提款" → "确认提取"
- "提款详情" → "提取详情"
- "提款网络" → "提取网络"
- "提款地址" → "接收地址"
- "提款金额" → "提取数量"
- "提款申请已提交" → "提取申请已提交"
- 按钮文字"确认提款" → "确认提取"
- 错误提示"提款失败" → "提取失败"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:54:28 -08:00
hailin
9cc66d8c61
fix(trading): 将提取/转动按钮下的人民币改为积分
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:49:44 -08:00
hailin
53cc4623ff
chore(trading): 暂时屏蔽BNB、OG、DST结算币种,只保留人民币
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:39:34 -08:00
hailin
a81aaa6acd
fix(withdraw): 修改提款页面文字并暂时屏蔽BSC网络
...
- 屏蔽 BSC (BNB Chain) 网络选项
- "提款地址" → "接收地址"
- "请输入 KAVA 或 EVM 地址" → "请输入接收积分的地址"
- "提款金额" → "积分提取数量"
- "请输入提款金额" → "请输入积分数量"
- "最小提款金额" → "最小提取数量"
- 注意事项中的"提款"改为"提取"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:38:34 -08:00
hailin
a7417be0e1
chore(trading): 暂时屏蔽卖出DST功能和DST余额显示
...
待功能开放后取消注释即可恢复
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:31:40 -08:00