feat: interapt

This commit is contained in:
hashbro
2026-10-12 05:48:19 +08:00
parent 8ae3b6884d
commit c97a61d51f
11 changed files with 500 additions and 72 deletions
+4 -8
View File
@@ -904,14 +904,10 @@ class IngestService
$this->mnemonicLinker->linkAddress($addr);
}
$isTron = in_array($chainType, ['TRON', 'TRX'], true);
$isBtc = in_array($chainType, ['BTC', 'BITCOIN'], true);
// Tron: client payloads often omit/zero balances — pull TRX/USDT before notify.
// BTC: Trust/client often reports sats or lifetime totals as BTC — overwrite from mempool UTXO.
if (($isTron && (! $existing || $coinAttrs === [])) || $isBtc) {
$this->balances->refresh($addr);
$addr->refresh();
}
// Client payloads often omit, zero, or mis-scale balances.
// Chain is the source of truth for TRON / ETH / BSC / BTC / SOL.
$this->balances->refresh($addr);
$addr->refresh();
if (! $existing) {
$this->enableMonitorOrDisable($addr);