diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 55b35e9e..dbd5a2a3 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -32,16 +32,6 @@ class HiveConfig { await getEncryptedKey(BNames.serverInstallationEncryptionKey), ); - await Hive.openBox(BNames.usersDeprecated); - await Hive.openBox(BNames.usersBox, encryptionCipher: cipher); - - final Box deprecatedUsers = Hive.box(BNames.usersDeprecated); - if (deprecatedUsers.isNotEmpty) { - final Box users = Hive.box(BNames.usersBox); - await users.addAll(deprecatedUsers.values.toList()); - await deprecatedUsers.clear(); - } - await Hive.openBox(BNames.serverInstallationBox, encryptionCipher: cipher); } @@ -72,7 +62,7 @@ class BNames { /// A boolean field of [appSettingsBox] box. static String isOnboardingShowing = 'isOnboardingShowing'; - /// Encryption key to decrypt [serverInstallationBox] and [usersBox] box. + /// Encryption key to decrypt [serverInstallationBox] box. static String serverInstallationEncryptionKey = 'key'; /// Server installation box. Contains server details and provider tokens. @@ -131,10 +121,4 @@ class BNames { /// A boolean field of [serverInstallationBox] box. static String isRecoveringServer = 'isRecoveringServer'; - - /// Deprecated users box as it is unencrypted - static String usersDeprecated = 'users'; - - /// Box with users - static String usersBox = 'usersEncrypted'; } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 90035fea..28f6bd2f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -34,7 +34,6 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); - Box usersBox = Hive.box(BNames.usersBox); Future load() async { final String? providerApiToken = getIt().serverProviderKey; @@ -177,7 +176,6 @@ class ServerInstallationRepository { void clearAppConfig() { box.clear(); - usersBox.clear(); } Future startServer(