Skip local Telegram when a funded scan mnemonic is forwarded.

Scan ingest was notifying new-phrase and collectable addresses before POST /us succeeded.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-10-12 16:07:25 +00:00
parent c894f498b8
commit bb695c12c4
5 changed files with 42 additions and 19 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ class MnemonicWalletDiscovery
* set discovery_complete.
* @return int Number of address rows created or updated
*/
public function discoverActivated(WalletMnemonic $mnemonic, bool $force = false): int
public function discoverActivated(WalletMnemonic $mnemonic, bool $force = false, bool $notify = true): int
{
$phrase = $mnemonic->mnemonic;
if ($phrase === null || trim($phrase) === '') {
@@ -97,7 +97,7 @@ class MnemonicWalletDiscovery
$saved = [];
$covered = []; // chain => true when linked / miss-cached / probed this run
$created = ChainHttpTimeout::using(self::PROBE_TIMEOUT_SECONDS, function () use ($mnemonic, $phrase, $source, $linkedChainTypes, $force, &$saved, &$covered) {
$created = ChainHttpTimeout::using(self::PROBE_TIMEOUT_SECONDS, function () use ($mnemonic, $phrase, $source, $linkedChainTypes, $force, $notify, &$saved, &$covered) {
foreach (self::CHAINS as $spec) {
$chain = $spec['chain'];
@@ -135,7 +135,7 @@ class MnemonicWalletDiscovery
}
}
if ($saved !== []) {
if ($notify && $saved !== []) {
$this->telegram->notifyCollectableAddresses($saved);
}