Add reset cache for monero wallet if wallets files are not correspond.
M committed
Aug 23, 2021 at 14:43 UTC
2a0556720ca35ffe5bc7aa874be6642dc6c565d0
1 file changed
+5
-2
lib/monero/monero_wallet_service.dart
+5
-2
@@ -123,10 +123,13 @@ class MoneroWalletService extends WalletService<
123
} catch (e) {
124
// TODO: Implement Exception for wallet list service.
125
126
- if (e.toString().contains('bad_alloc') ||
126
+ if ((e.toString().contains('bad_alloc') ||
127
(e is WalletOpeningException &&
128
(e.message == 'std::bad_alloc' ||
129
- e.message.contains('bad_alloc')))) {
129
+ e.message.contains('bad_alloc')))) ||
130
+ (e.toString().contains('does not correspond') ||
131
+ (e is WalletOpeningException &&
132
+ e.message.contains('does not correspond')))) {
133
await restoreOrResetWalletFiles(name);
134
return openWallet(name, password);
135
}