mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-27 05:49:21 +00:00
31 lines
912 B
Dart
31 lines
912 B
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
|
|
import '../../utilities/flutter_secure_storage_interface.dart';
|
|
import '../../utilities/util.dart';
|
|
import '../desktop/storage_crypto_handler_provider.dart';
|
|
|
|
final secureStoreProvider = Provider<SecureStorageInterface>((ref) {
|
|
if (Util.isDesktop) {
|
|
final handler = ref.read(storageCryptoHandlerProvider).handler;
|
|
return SecureStorageWrapper(
|
|
store: DesktopSecureStore(handler),
|
|
isDesktop: true,
|
|
);
|
|
} else {
|
|
return const SecureStorageWrapper(
|
|
store: FlutterSecureStorage(),
|
|
isDesktop: false,
|
|
);
|
|
}
|
|
});
|