From 4df2a7d2147a46ef4d909f96aa91a1d738d16fb0 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 25 Apr 2024 09:16:43 -0600 Subject: [PATCH] remove unused frost wallet toggle --- .../add_wallet_view/add_wallet_view.dart | 11 +--------- lib/utilities/prefs.dart | 22 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart b/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart index d84bfc708..6d0582c5c 100644 --- a/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart +++ b/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart @@ -46,7 +46,7 @@ import 'package:stackwallet/widgets/stack_text_field.dart'; import 'package:stackwallet/widgets/textfield_icon_button.dart'; class AddWalletView extends ConsumerStatefulWidget { - const AddWalletView({Key? key}) : super(key: key); + const AddWalletView({super.key}); static const routeName = "/addWallet"; @@ -134,11 +134,6 @@ class _AddWalletViewState extends ConsumerState { _coins.remove(Coin.wownero); } - // Remove FROST from the list of coins based on our frostEnabled preference. - if (!ref.read(prefsChangeNotifierProvider).frostEnabled) { - _coins.remove(Coin.bitcoinFrost); - } - // Remove Solana from the list of coins based on our frostEnabled preference. if (!ref.read(prefsChangeNotifierProvider).solanaEnabled) { _coins.remove(Coin.solana); @@ -147,10 +142,6 @@ class _AddWalletViewState extends ConsumerState { coinEntities.addAll(_coins.map((e) => CoinEntity(e))); if (ref.read(prefsChangeNotifierProvider).showTestNetCoins) { - if (!ref.read(prefsChangeNotifierProvider).frostEnabled) { - _coinsTestnet.remove(Coin.bitcoinFrostTestNet); - } - coinEntities.addAll(_coinsTestnet.map((e) => CoinEntity(e))); } diff --git a/lib/utilities/prefs.dart b/lib/utilities/prefs.dart index d380901c3..fc3d29e71 100644 --- a/lib/utilities/prefs.dart +++ b/lib/utilities/prefs.dart @@ -69,7 +69,6 @@ class Prefs extends ChangeNotifier { _useTor = await _getUseTor(); _fusionServerInfo = await _getFusionServerInfo(); _solanaEnabled = await _getSolanaEnabled(); - _frostEnabled = await _getFrostEnabled(); _initialized = true; } @@ -1031,25 +1030,4 @@ class Prefs extends ChangeNotifier { boxName: DB.boxNamePrefs, key: "solanaEnabled") as bool? ?? false; } - - // FROST multisig - - bool _frostEnabled = false; - - bool get frostEnabled => _frostEnabled; - - set frostEnabled(bool frostEnabled) { - if (_frostEnabled != frostEnabled) { - DB.instance.put( - boxName: DB.boxNamePrefs, key: "frostEnabled", value: frostEnabled); - _frostEnabled = frostEnabled; - notifyListeners(); - } - } - - Future _getFrostEnabled() async { - return await DB.instance.get( - boxName: DB.boxNamePrefs, key: "frostEnabled") as bool? ?? - false; - } }