diff --git a/lib/core/backup_service.dart b/lib/core/backup_service.dart index 4f34777ae..227af2d6c 100644 --- a/lib/core/backup_service.dart +++ b/lib/core/backup_service.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; +import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; @@ -168,7 +169,7 @@ class BackupService { if (!isCorrentCurrentWallet) { currentWalletName = _correctWallets.first.name; - currentWalletType = _correctWallets.first.type.index; + currentWalletType = serializeToInt(_correctWallets.first.type); } await _sharedPreferences.setString(PreferencesKey.currentWalletName,