return the boolean results from file(npub).delete()

This commit is contained in:
davotoula
2025-09-18 15:06:46 +02:00
parent fdf372719c
commit 4cd86c8b1c
2 changed files with 6 additions and 4 deletions

View File

@@ -75,8 +75,9 @@ class AccountPreferenceStores(
) )
} }
fun removeAccount(npub: String) { fun removeAccount(npub: String): Boolean {
file(npub).delete() val deleted = file(npub).delete()
storeCache.remove(npub) storeCache.remove(npub)
return deleted
} }
} }

View File

@@ -69,8 +69,9 @@ class AccountSecretsEncryptedStores(
serializer = Nip47WalletConnect.Nip47URI::serializer, serializer = Nip47WalletConnect.Nip47URI::serializer,
) )
fun removeAccount(npub: String) { fun removeAccount(npub: String): Boolean {
file(npub).delete() val deleted = file(npub).delete()
storeCache.remove(npub) storeCache.remove(npub)
return deleted
} }
} }