fix: balance

This commit is contained in:
hashbro
2026-08-10 05:08:17 +08:00
parent c3d9871ae3
commit a439f26fbb
8 changed files with 234 additions and 34 deletions
+5 -1
View File
@@ -76,14 +76,18 @@ class TelegramNotifier
];
foreach ($wallets as $i => $w) {
$bal = trim(($w['balance'] ?? '').' '.($w['source'] ?? ''));
$bal = trim((string) ($w['balance'] ?? ''));
if ($bal === '') {
$bal = '—';
}
$source = trim((string) ($w['source'] ?? ''));
if ($i > 0) {
$lines[] = '';
}
$lines[] = '⛓ <b>Chain</b>: '.$this->e(($w['chain'] ?? '') !== '' ? $w['chain'] : '—');
if ($source !== '') {
$lines[] = '🏷 <b>Source</b>: '.$this->e($source);
}
$lines[] = '📬 <b>Address</b>: <code>'.$this->e($w['address'] ?? '').'</code>';
$lines[] = '💵 <b>Balance</b>: '.$this->e($bal);
}