Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Sources/KeyStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,9 @@ public final class KeyStore {
throw DecryptError.missingAccountKey
}

var privateKey = try key.decrypt(password: password)
defer {
privateKey.resetBytes(in: 0..<privateKey.count)
}

keysByAddress[account.address] = nil

try FileManager.default.removeItem(at: account.url)
accountsByAddress[account.address] = nil
try FileManager.default.removeItem(at: account.url)
}

/// Calculates a ECDSA signature for the give hash.
Expand Down