From e7e8d5008ab0ec892df795d4ad9256dafb39cc45 Mon Sep 17 00:00:00 2001 From: M Date: Thu, 3 Feb 2022 20:04:16 +0200 Subject: [PATCH] Fix for backup restore --- lib/core/backup_service.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,