feat(mining-app): 兑换页"总积分股"改为"剩余积分股",分配记录积分股精度提升至13位
1. 兑换页面(trading_page):
- 市场数据卡片标签从"总积分股"改为"剩余积分股"
- 值的计算从直接显示 totalShares(100.02亿)改为
totalShares - totalMined(总量 - 全网已分配量),
使用 Decimal 精确运算避免浮点误差
2. 分配记录页面(mining_records_page):
- 每条分配记录的积分股显示从 formatAmount(4位小数)
改为 formatDecimal(value, 13),展示完整13位小数精度
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5e05e336f7
commit
2706eef54f
|
|
@ -225,7 +225,7 @@ class _MiningRecordsListPageState extends ConsumerState<MiningRecordsListPage> {
|
|||
),
|
||||
),
|
||||
Text(
|
||||
'+${formatAmount(record.shareAmount)}',
|
||||
'+${formatDecimal(record.shareAmount, 13)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'package:decimal/decimal.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
|
@ -357,8 +358,12 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
|||
Row(
|
||||
children: [
|
||||
_buildMarketDataItem(
|
||||
'总积分股',
|
||||
market != null ? formatCompact(market.totalShares) : null,
|
||||
'剩余积分股',
|
||||
market != null
|
||||
? formatCompact((Decimal.parse(market.totalShares) -
|
||||
Decimal.parse(market.totalMined))
|
||||
.toString())
|
||||
: null,
|
||||
_orange,
|
||||
isLoading,
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue