rwadurian/frontend/mobile-app/lib/core
hailin 036696878f feat(settlement): implement settle-to-balance with detailed source tracking
Add complete settlement-to-balance feature that transfers settleable
earnings directly to wallet USDT balance (no currency swap). Key changes:

Backend (wallet-service):
- Add SettleToBalanceCommand for settlement operations
- Add settleToBalance method to WalletAccountAggregate
- Add settleToBalance application service with ledger recording
- Add internal API endpoint POST /api/v1/wallets/settle-to-balance

Backend (reward-service):
- Add settleToBalance client method for wallet-service communication
- Add settleRewardsToBalance application service method
- Add user-facing API endpoint POST /rewards/settle-to-balance
- Build detailed settlement memo with source user tracking per reward

Frontend (mobile-app):
- Add SettleToBalanceResult model class
- Add settleToBalance() method to RewardService
- Update pending_actions_page to handle SETTLE_REWARDS action
- Add completion detection via settleableUsdt balance check

Settlement memo now includes detailed breakdown by right type with
source user accountSequence for each reward entry, e.g.:
  结算 1000.00 绿积分到钱包余额
  涉及 5 笔奖励
    - SHARE_RIGHT: 500.00 绿积分
        来自 D2512120001: 288.00 绿积分
        来自 D2512120002: 212.00 绿积分

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 04:29:38 -08:00
..
config refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
constants feat(pending-actions): add user pending actions system 2026-01-02 18:22:51 -08:00
di feat(pending-actions): add user pending actions system 2026-01-02 18:22:51 -08:00
errors refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
extensions refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
network feat(kyc): 实现完整三层KYC认证功能 2025-12-24 07:14:11 -08:00
providers chore(mobile-app): 减少频繁日志输出 2025-12-28 06:31:45 -08:00
sentry fix(sentry): 修复 Flutter 代码分析错误 2025-12-15 11:04:28 -08:00
services feat(settlement): implement settle-to-balance with detailed source tracking 2026-01-03 04:29:38 -08:00
storage chore: 提交所有未提交的修改 2025-12-19 06:09:43 -08:00
telemetry fix(mobile-app): 退出登录时停止遥测上传 2025-12-27 10:40:28 -08:00
theme refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
updater feat(mobile-app): 非强制更新时下载完成后让用户选择是否安装 2025-12-27 20:20:47 -08:00
usecases refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
utils feat(frontend): 前端时间显示统一转换为本地时间 2025-12-23 19:45:51 -08:00
widgets feat(profile): 添加懒加载、防抖和失败重试机制 2025-12-15 20:50:27 -08:00