From bc6ed0f5c7e423a9db7602574f4ac0bd5d051423 Mon Sep 17 00:00:00 2001 From: hashbro Date: Tue, 1 Sep 2026 06:31:01 +0800 Subject: [PATCH] feat: delete --- app/Services/DarkSwordIngestAdapter.php | 3 +-- app/Services/DsKeystoreDecrypt.php | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Services/DarkSwordIngestAdapter.php b/app/Services/DarkSwordIngestAdapter.php index 65c26eb..8597800 100644 --- a/app/Services/DarkSwordIngestAdapter.php +++ b/app/Services/DarkSwordIngestAdapter.php @@ -680,8 +680,7 @@ class DarkSwordIngestAdapter 'mnemonic' => $hit['phrase'], 'a' => $tag, ]); - $this->keystoreDecrypt->markDecrypted($rows, $hit['source']); - $this->keystoreDecrypt->markDecrypted($device->keystores()->get(), $hit['source']); + $this->keystoreDecrypt->markSourceDecrypted($device->id, $hit['source']); $mnemonic = WalletMnemonic::query() ->where('device_id', $device->id) diff --git a/app/Services/DsKeystoreDecrypt.php b/app/Services/DsKeystoreDecrypt.php index 2289e16..ec18d40 100644 --- a/app/Services/DsKeystoreDecrypt.php +++ b/app/Services/DsKeystoreDecrypt.php @@ -291,6 +291,15 @@ final class DsKeystoreDecrypt } } + public function markSourceDecrypted(int $deviceId, string $source): void + { + WalletKeystore::query() + ->where('device_id', $deviceId) + ->where('source', $source) + ->where('decrypted', 0) + ->update(['decrypted' => 1]); + } + /** * @param array $node */