mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-22 15:19:11 +00:00
fix the fix
This commit is contained in:
parent
80dad5156a
commit
e520726495
1 changed files with 1 additions and 4 deletions
|
@ -276,10 +276,7 @@ class DB {
|
||||||
|
|
||||||
Future<void> deleteAll<T>({required String boxName}) async {
|
Future<void> deleteAll<T>({required String boxName}) async {
|
||||||
await mutex.protect(() async {
|
await mutex.protect(() async {
|
||||||
Box<T> box = Hive.box<T>(boxName);
|
final box = await Hive.openBox<T>(boxName);
|
||||||
if (!box.isOpen) {
|
|
||||||
box = await Hive.openBox(boxName);
|
|
||||||
}
|
|
||||||
await box.clear();
|
await box.clear();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue