diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountPreferenceStores.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountPreferenceStores.kt index d84767041..65ecf3981 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountPreferenceStores.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountPreferenceStores.kt @@ -75,8 +75,9 @@ class AccountPreferenceStores( ) } - fun removeAccount(npub: String) { - file(npub).delete() + fun removeAccount(npub: String): Boolean { + val deleted = file(npub).delete() storeCache.remove(npub) + return deleted } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountSecretsEncryptedStores.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountSecretsEncryptedStores.kt index fadcad035..3b6687ac8 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountSecretsEncryptedStores.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/preferences/AccountSecretsEncryptedStores.kt @@ -69,8 +69,9 @@ class AccountSecretsEncryptedStores( serializer = Nip47WalletConnect.Nip47URI::serializer, ) - fun removeAccount(npub: String) { - file(npub).delete() + fun removeAccount(npub: String): Boolean { + val deleted = file(npub).delete() storeCache.remove(npub) + return deleted } }