## 目标 将 Amount 类型在整个项目中推广,实现类型安全的金额处理。 **核心原则:** - 所有金额在内存中使用 `Amount` 对象 - `Amount.from*()` 仅在 Service 层和 Component 边界发生 - `amount.toFormatted()` / `toRawString()` 仅在显示/序列化时发生 ## 架构 ``` 显示层 (View) ↑ amount.toFormatted() 业务层 (Hooks/Stores) ← Amount 对象传递 ↑ Amount 对象 服务层 (Services) ↑ Amount.fromRaw() 外部数据 (API/Chain) ``` ## 子任务 ### Phase 1: 基础设施增强 - [ ] #64 增强 Amount 类:Big.js 集成 + 序列化支持 - [ ] #65 创建 AmountInput V2 组件 ### Phase 2: 类型定义重构 - [ ] #66 AssetInfo.amount → Amount - [ ] #67 Transaction/Staking 类型 → Amount - [ ] #68 Chain Adapter 类型 → Amount ### Phase 3: Service 层重构 - [ ] #69 所有 Service 返回 Amount ### Phase 4: Hooks/Stores 重构 - [ ] #70 useAssets/useSend/Stores → Amount ### Phase 5: Component 层重构 - [ ] #71 Input/Display Components → Amount ### Phase 6: Page 层整合 - [ ] #72 所有 Page 使用 Amount ## 已完成 - [x] #62 feat: add Amount class for type-safe monetary operations
Activity
feat: enhance Amount class with Big.js integration
feat: enhance Amount class with Big.js integration (#73)
feat: adopt Amount type across types, services, and pages
feat: adopt Amount type across types, services, and pages (#65, #66, #67
Gaubee commentedon Dec 22, 2025
Progress Update
Completed PRs:
Remaining:
Summary:
Almost all Amount type work is complete. Once PR #75 is merged, the entire Epic will be done.
Gaubee commentedon Dec 22, 2025
🎉 Epic Complete!
All sub-tasks have been completed:
The Amount type is now used across the entire codebase for type-safe monetary operations.