mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Remove FlutterSecureStorage Reference
This commit is contained in:
parent
492a8b2c0a
commit
67a96807d1
2 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:cake_wallet/core/secure_storage.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
enum SecretStoreKey { moneroWalletPassword, pinCodePassword, backupPassword }
|
||||
|
@ -66,7 +66,7 @@ class SecureKey {
|
|||
static const lastAuthTimeMilliseconds = 'last_auth_time_milliseconds';
|
||||
|
||||
static Future<int?> getInt({
|
||||
required FlutterSecureStorage secureStorage,
|
||||
required SecureStorage secureStorage,
|
||||
required SharedPreferences sharedPreferences,
|
||||
required String key,
|
||||
}) async {
|
||||
|
@ -76,7 +76,7 @@ class SecureKey {
|
|||
}
|
||||
|
||||
static Future<bool?> getBool({
|
||||
required FlutterSecureStorage secureStorage,
|
||||
required SecureStorage secureStorage,
|
||||
required SharedPreferences sharedPreferences,
|
||||
required String key,
|
||||
}) async {
|
||||
|
@ -91,7 +91,7 @@ class SecureKey {
|
|||
}
|
||||
|
||||
static Future<String?> getString({
|
||||
required FlutterSecureStorage secureStorage,
|
||||
required SecureStorage secureStorage,
|
||||
required SharedPreferences sharedPreferences,
|
||||
required String key,
|
||||
}) async {
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:io';
|
|||
|
||||
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
||||
import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart';
|
||||
import 'package:cake_wallet/core/secure_storage.dart';
|
||||
import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
|
||||
import 'package:cake_wallet/entities/provider_types.dart';
|
||||
import 'package:cake_wallet/entities/cake_2fa_preset_options.dart';
|
||||
|
@ -24,7 +25,6 @@ import 'package:cake_wallet/themes/theme_base.dart';
|
|||
import 'package:cake_wallet/themes/theme_list.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
@ -46,7 +46,7 @@ class SettingsStore = SettingsStoreBase with _$SettingsStore;
|
|||
|
||||
abstract class SettingsStoreBase with Store {
|
||||
SettingsStoreBase(
|
||||
{required FlutterSecureStorage secureStorage,
|
||||
{required SecureStorage secureStorage,
|
||||
required BackgroundTasks backgroundTasks,
|
||||
required SharedPreferences sharedPreferences,
|
||||
required bool initialShouldShowMarketPlaceInDashboard,
|
||||
|
@ -680,7 +680,7 @@ abstract class SettingsStoreBase with Store {
|
|||
|
||||
String deviceName;
|
||||
|
||||
final FlutterSecureStorage _secureStorage;
|
||||
final SecureStorage _secureStorage;
|
||||
final SharedPreferences _sharedPreferences;
|
||||
final BackgroundTasks _backgroundTasks;
|
||||
|
||||
|
@ -723,7 +723,7 @@ abstract class SettingsStoreBase with Store {
|
|||
BalanceDisplayMode initialBalanceDisplayMode = BalanceDisplayMode.availableBalance,
|
||||
ThemeBase? initialTheme}) async {
|
||||
final sharedPreferences = await getIt.getAsync<SharedPreferences>();
|
||||
final secureStorage = await getIt.get<FlutterSecureStorage>();
|
||||
final secureStorage = await getIt.get<SecureStorage>();
|
||||
final backgroundTasks = getIt.get<BackgroundTasks>();
|
||||
final currentFiatCurrency = FiatCurrency.deserialize(
|
||||
raw: sharedPreferences.getString(PreferencesKey.currentFiatCurrencyKey)!);
|
||||
|
|
Loading…
Reference in a new issue