use pref to cull frost things if not enabled

This commit is contained in:
sneurlax 2024-03-20 16:08:33 -05:00
parent 5e7c9ad65b
commit 0f4fb8378f

View file

@ -134,9 +134,18 @@ 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);
}
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)));
}