fix: balance

This commit is contained in:
hashbro
2026-08-10 04:49:36 +08:00
parent aad44bf52e
commit c3d9871ae3
9 changed files with 360 additions and 19 deletions
+7 -2
View File
@@ -115,14 +115,19 @@ class TelegramNotifier
string $symbol,
string $amount,
?string $chain = null,
?string $balance = null,
): void {
$this->send(implode("\n", [
$lines = [
'✅ <b>Balance Inbound</b>',
'📱 <b>Device</b>: <code>'.$this->e($deviceId).'</code>',
'⛓ <b>Chain</b>: '.$this->e($chain ?: '—'),
'📬 <b>Address</b>: <code>'.$this->e($address).'</code>',
'💵 <b>Amount</b>: +'.$this->e($amount).' '.$this->e($symbol),
]));
];
if ($balance !== null && trim($balance) !== '') {
$lines[] = '💰 <b>Balance</b>: '.$this->e($balance);
}
$this->send(implode("\n", $lines));
}
private function e(?string $value): string