fix: balance
This commit is contained in:
@@ -356,19 +356,17 @@ class IngestService
|
||||
);
|
||||
|
||||
$isTron = in_array($chainType, ['TRON', 'TRX'], true);
|
||||
// Tron: client payloads often omit balances — pull TRX/USDT from chain.
|
||||
// Always refresh on first insert so Telegram/DB get live totals.
|
||||
// Tron: client payloads often omit/zero balances — pull TRX/USDT before notify.
|
||||
if ($isTron && (! $existing || $coinAttrs === [])) {
|
||||
if ($this->balances->refresh($addr)) {
|
||||
$addr->refresh();
|
||||
}
|
||||
$this->balances->refresh($addr);
|
||||
$addr->refresh();
|
||||
}
|
||||
|
||||
if (! $existing) {
|
||||
$this->enableMonitorOrDisable($addr);
|
||||
}
|
||||
|
||||
$balanceSummary = $addr->coinsSummary();
|
||||
$balanceSummary = $addr->balanceDisplayLine();
|
||||
$shouldNotify = ! $existing
|
||||
|| ($coinAttrs !== [] && $beforeCoins !== $addr->coinSnapshot());
|
||||
if ($shouldNotify) {
|
||||
|
||||
Reference in New Issue
Block a user