chore(mining-admin-web): change decimal display precision from 8 to 7

Updated all price and decimal displays to use 7 decimal places:
- Dashboard stats cards
- Price overview
- Mining records list
- Trade orders list
- Reports page
- formatPrice utility function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-15 02:45:13 -08:00
parent 0b435e911a
commit 362b0fac99
6 changed files with 6 additions and 6 deletions

View File

@ -125,7 +125,7 @@ export default function ReportsPage() {
</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(report.dailyDistributed, 2)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(report.dailyBurned, 2)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(report.closePrice, 8)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(report.closePrice, 7)}</TableCell>
<TableCell className="text-right font-mono">{formatCompactNumber(report.dailyVolume)}</TableCell>
</TableRow>
))

View File

@ -21,7 +21,7 @@ export function PriceOverview() {
<div className="space-y-2">
<p className="text-sm text-muted-foreground"></p>
<div className="flex items-baseline gap-2">
<span className="text-3xl font-bold">{formatDecimal(stats?.currentPrice, 8)}</span>
<span className="text-3xl font-bold">{formatDecimal(stats?.currentPrice, 7)}</span>
<span className="text-sm text-muted-foreground">绿/</span>
</div>
<div className={`flex items-center gap-1 text-sm ${isPriceUp ? 'text-green-500' : 'text-red-500'}`}>

View File

@ -38,7 +38,7 @@ export function StatsCards() {
const cards = [
{
title: '当前价格',
value: formatDecimal(stats?.currentPrice, 8),
value: formatDecimal(stats?.currentPrice, 7),
unit: '绿积分/股',
icon: isPriceUp ? TrendingUp : TrendingDown,
iconColor: isPriceUp ? 'text-green-500' : 'text-red-500',

View File

@ -58,7 +58,7 @@ export function MiningRecordsList({ accountSequence }: MiningRecordsListProps) {
<TableCell className="text-right font-mono text-primary">
+{formatDecimal(record.shareAmount, 4)}
</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(record.priceSnapshot, 8)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(record.priceSnapshot, 7)}</TableCell>
<TableCell className="text-sm">{formatDateTime(record.createdAt)}</TableCell>
</TableRow>
))

View File

@ -79,7 +79,7 @@ export function TradeOrdersList({ accountSequence }: TradeOrdersListProps) {
{status.label}
</span>
</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(order.price, 8)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(order.price, 7)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(order.quantity, 4)}</TableCell>
<TableCell className="text-right font-mono">{formatDecimal(order.filledQuantity, 4)}</TableCell>
<TableCell className="text-sm">{formatDateTime(order.createdAt)}</TableCell>

View File

@ -40,7 +40,7 @@ export function formatCompactNumber(value: number | string | undefined | null):
}
export function formatPrice(value: string | number | undefined | null): string {
return formatDecimal(value, 8);
return formatDecimal(value, 7);
}
export function formatShareAmount(value: string | number | undefined | null): string {