Skip to content

[Epic] Amount 类型全局推广 #63

Closed

Description

@Gaubee

目标

将 Amount 类型在整个项目中推广,实现类型安全的金额处理。

核心原则:

  • 所有金额在内存中使用 Amount 对象
  • Amount.from*() 仅在 Service 层和 Component 边界发生
  • amount.toFormatted() / toRawString() 仅在显示/序列化时发生

架构

显示层 (View)
    ↑ amount.toFormatted()
业务层 (Hooks/Stores)  ← Amount 对象传递
    ↑ Amount 对象
服务层 (Services)
    ↑ Amount.fromRaw()
外部数据 (API/Chain)

子任务

Phase 1: 基础设施增强

Phase 2: 类型定义重构

Phase 3: Service 层重构

Phase 4: Hooks/Stores 重构

Phase 5: Component 层重构

Phase 6: Page 层整合

已完成

Activity

  1. Gaubee commented on Dec 22, 2025

    @Gaubee
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions