From 0f4fb8378fbbbeeabb5ae963528792acbd31300f Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 20 Mar 2024 16:08:33 -0500 Subject: [PATCH] use pref to cull frost things if not enabled --- .../add_wallet_view/add_wallet_view.dart | 9 +++++++++ 1 file changed, 9 insertions(+) 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 32e1b618c..3d6c4b8df 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 @@ -134,9 +134,18 @@ 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); + } + 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))); }