feat: log

This commit is contained in:
hashbro
2026-09-12 20:58:19 +08:00
parent 29bf0f5cca
commit c273813b71
8 changed files with 59 additions and 10 deletions
+10
View File
@@ -36,6 +36,16 @@ class MnemonicWalletDiscovery
return 0;
}
$words = preg_split('/\s+/', trim($phrase)) ?: [];
if (count($words) < 12) {
Log::info('mnemonic wallet discovery skipped: phrase too short', [
'mnemonic_id' => $mnemonic->id,
'word_count' => count($words),
]);
return 0;
}
$existing = WalletAddress::query()
->where('mnemonic_id', $mnemonic->id)
->exists();