Fix for backup restore

M committed Feb 3, 2022 at 20:04 UTC e7e8d5008ab0ec892df795d4ad9256dafb39cc45
1 file changed +2 -1
lib/core/backup_service.dart
+2 -1
@@ -1,6 +1,7 @@
1 import 'dart:convert';
2 import 'dart:io';
3 import 'dart:typed_data';
4 +import 'package:cw_core/wallet_type.dart';
5 import 'package:flutter/foundation.dart';
6 import 'package:hive/hive.dart';
7 import 'package:flutter_secure_storage/flutter_secure_storage.dart';
@@ -168,7 +169,7 @@ class BackupService {
169
170 if (!isCorrentCurrentWallet) {
171 currentWalletName = _correctWallets.first.name;
171 - currentWalletType = _correctWallets.first.type.index;
172 + currentWalletType = serializeToInt(_correctWallets.first.type);
173 }
174
175 await _sharedPreferences.setString(PreferencesKey.currentWalletName,