mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 19:26:37 +00:00
windows reset password DPS error fix
This commit is contained in:
parent
c6dd9394be
commit
f85d2895fc
1 changed files with 16 additions and 1 deletions
|
@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stackwallet/hive/db.dart';
|
||||
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||
import 'package:stackwallet/pages/intro_view.dart';
|
||||
|
@ -42,7 +43,21 @@ class _ForgotPasswordDesktopViewState
|
|||
|
||||
try {
|
||||
await Hive.close();
|
||||
if (Platform.isWindows || Platform.isLinux) {
|
||||
if (Platform.isWindows) {
|
||||
final xmrDir = Directory("${appRoot.path}/wallets");
|
||||
if (xmrDir.existsSync()) {
|
||||
await xmrDir.delete(recursive: true);
|
||||
}
|
||||
final epicDir = Directory("${appRoot.path}/epiccash");
|
||||
if (epicDir.existsSync()) {
|
||||
await epicDir.delete(recursive: true);
|
||||
}
|
||||
|
||||
await Isar.getInstance("desktopStore")?.close(deleteFromDisk: true);
|
||||
|
||||
await (await StackFileSystem.applicationHiveDirectory())
|
||||
.delete(recursive: true);
|
||||
} else if (Platform.isLinux) {
|
||||
await appRoot.delete(recursive: true);
|
||||
} else {
|
||||
// macos in ipad mode
|
||||
|
|
Loading…
Reference in a new issue