feat: add delete all local data option in settings with keypair destruction
This commit is contained in:
@@ -140,6 +140,12 @@ class CryptoService {
|
||||
this.keyPair = null
|
||||
}
|
||||
|
||||
destroyKeyPair() {
|
||||
this.keyPair = null
|
||||
localStorage.removeItem(STORAGE_KEY)
|
||||
localStorage.removeItem(SALT_KEY)
|
||||
}
|
||||
|
||||
getPublicKey() {
|
||||
if (!this.keyPair) return null
|
||||
return this.naclUtil.encodeBase64(this.keyPair.publicKey)
|
||||
|
||||
Reference in New Issue
Block a user