diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e08984e..2ccaa3c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -47,9 +47,6 @@ - diff --git a/lib/coin/coin.dart b/lib/coin/coin.dart index 1409521..e411e6b 100644 --- a/lib/coin/coin.dart +++ b/lib/coin/coin.dart @@ -43,12 +43,12 @@ abstract class CoinBase { bool exists() => File(dbFullPath).existsSync(); - Future open(bool wal) async { - print("Opening DB ${dbFullPath}"); + Future open(bool delete_wal) async { + print("Opening DB ${dbFullPath}, delete_wal = ${delete_wal}"); // schema handled in backend db = await openDatabase(dbFullPath, onConfigure: (db) async { - if (wal) - await db.rawQuery("PRAGMA journal_mode=WAL"); + if (delete_wal) + await db.rawQuery("PRAGMA journal_mode=DELETE"); }); } diff --git a/lib/main.dart b/lib/main.dart index cef6d59..87452db 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -348,10 +348,8 @@ class ZWalletAppState extends State { final dbPath = await getDbPath(); for (var coin in coins) { coin.init(dbPath); - if (!coin.exists()) { - await coin.open(false); - await coin.close(); - } + await coin.open(true); + await coin.close(); } if (exportDb) { @@ -362,7 +360,7 @@ class ZWalletAppState extends State { if (recover) { for (var coin in coins) { await coin.importFromTemp(); - await coin.open(false); + await coin.open(true); await coin.close(); } } @@ -383,7 +381,7 @@ class ZWalletAppState extends State { } for (var coin in coins) { - await coin.open(true); + await coin.open(false); } _setProgress(0.6, 'Loading Account Data'); diff --git a/pubspec.yaml b/pubspec.yaml index c6ae684..f4b836a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.17+333 +version: 1.2.17+334 environment: sdk: ">=2.12.0 <3.0.0"