进行了一些小优化

This commit is contained in:
kate522 committed 2026-08-25 05:59:50 +08:00
1 parent 5549f81901
commit 75d1e6e53b
7 files changed
+52 -8

No files matched your search

+4 -1
View File
@@ -669,7 +669,10 @@ class Withdrawal {
$row['amount'] = $this->database_balance_decimal((string) ($row['amount'] ?? '0'));
$row['fee_rate'] = (int) ($meta['fee_rate'] ?? 0);
$display = (string) ($meta['account'] ?? $row['account_info'] ?? '');
$row['display_account'] = strlen($display) > 4 ? substr($display, 0, 2) . str_repeat('*', max(2, strlen($display) - 4)) . substr($display, -2) : '****';
$display_length = mb_strlen($display, 'UTF-8');
$row['display_account'] = $display_length > 4
? mb_substr($display, 0, 2, 'UTF-8') . str_repeat('*', max(2, $display_length - 4)) . mb_substr($display, -2, null, 'UTF-8')
: '****';
$row['source'] = (string) ($meta['source'] ?? 'balance');
return $row;
}