mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-25 19:55:52 +00:00
remove unused frost wallet toggle
This commit is contained in:
parent
d145ec9546
commit
4df2a7d214
2 changed files with 1 additions and 32 deletions
|
@ -46,7 +46,7 @@ import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
class AddWalletView extends ConsumerStatefulWidget {
|
class AddWalletView extends ConsumerStatefulWidget {
|
||||||
const AddWalletView({Key? key}) : super(key: key);
|
const AddWalletView({super.key});
|
||||||
|
|
||||||
static const routeName = "/addWallet";
|
static const routeName = "/addWallet";
|
||||||
|
|
||||||
|
@ -134,11 +134,6 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
||||||
_coins.remove(Coin.wownero);
|
_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.
|
// Remove Solana from the list of coins based on our frostEnabled preference.
|
||||||
if (!ref.read(prefsChangeNotifierProvider).solanaEnabled) {
|
if (!ref.read(prefsChangeNotifierProvider).solanaEnabled) {
|
||||||
_coins.remove(Coin.solana);
|
_coins.remove(Coin.solana);
|
||||||
|
@ -147,10 +142,6 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
||||||
coinEntities.addAll(_coins.map((e) => CoinEntity(e)));
|
coinEntities.addAll(_coins.map((e) => CoinEntity(e)));
|
||||||
|
|
||||||
if (ref.read(prefsChangeNotifierProvider).showTestNetCoins) {
|
if (ref.read(prefsChangeNotifierProvider).showTestNetCoins) {
|
||||||
if (!ref.read(prefsChangeNotifierProvider).frostEnabled) {
|
|
||||||
_coinsTestnet.remove(Coin.bitcoinFrostTestNet);
|
|
||||||
}
|
|
||||||
|
|
||||||
coinEntities.addAll(_coinsTestnet.map((e) => CoinEntity(e)));
|
coinEntities.addAll(_coinsTestnet.map((e) => CoinEntity(e)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,6 @@ class Prefs extends ChangeNotifier {
|
||||||
_useTor = await _getUseTor();
|
_useTor = await _getUseTor();
|
||||||
_fusionServerInfo = await _getFusionServerInfo();
|
_fusionServerInfo = await _getFusionServerInfo();
|
||||||
_solanaEnabled = await _getSolanaEnabled();
|
_solanaEnabled = await _getSolanaEnabled();
|
||||||
_frostEnabled = await _getFrostEnabled();
|
|
||||||
|
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
@ -1031,25 +1030,4 @@ class Prefs extends ChangeNotifier {
|
||||||
boxName: DB.boxNamePrefs, key: "solanaEnabled") as bool? ??
|
boxName: DB.boxNamePrefs, key: "solanaEnabled") as bool? ??
|
||||||
false;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue