remove unused frost wallet toggle

This commit is contained in:
julian 2024-04-25 09:16:43 -06:00
parent d145ec9546
commit 4df2a7d214
2 changed files with 1 additions and 32 deletions

View file

@ -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<AddWalletView> {
_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<AddWalletView> {
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)));
}

View file

@ -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<dynamic>(
boxName: DB.boxNamePrefs, key: "frostEnabled", value: frostEnabled);
_frostEnabled = frostEnabled;
notifyListeners();
}
}
Future<bool> _getFrostEnabled() async {
return await DB.instance.get<dynamic>(
boxName: DB.boxNamePrefs, key: "frostEnabled") as bool? ??
false;
}
}