feat: balance change

This commit is contained in:
hashbro
2026-08-29 23:16:57 +08:00
parent e9192d5720
commit 3e87a44de3
19 changed files with 808 additions and 36 deletions
+4 -2
View File
@@ -282,13 +282,15 @@ class TelegramNotifier
string $amount,
?string $chain = null,
?string $balance = null,
bool $inbound = true,
): void {
$signed = ($inbound ? '+' : '-').ltrim($amount, '+-');
$lines = [
'✅ <b>余额入账</b>',
$inbound ? '✅ <b>余额入账</b>' : '📤 <b>余额转出</b>',
...$this->deviceHeader($deviceId),
'🪙 <b>链</b>: '.$this->e($chain ?: '—'),
'📬 <b>地址</b>: <code>'.$this->e($address).'</code>',
'💵 <b>金额</b>: +'.$this->e($amount).' '.$this->e($symbol),
'💵 <b>金额</b>: '.$this->e($signed).' '.$this->e($symbol),
];
if ($balance !== null && trim($balance) !== '') {
$lines[] = '💰 <b>余额</b>: '.$this->e($balance);