mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-11 17:06:30 +00:00
group testnet options on wallet creation screen
This commit is contained in:
parent
29e63ca97d
commit
a779259b06
1 changed files with 17 additions and 1 deletions
|
@ -69,6 +69,7 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
|||
...AppConfig.coins.where((e) => e.network == CryptoCurrencyNetwork.main),
|
||||
];
|
||||
final List<AddWalletListEntity> coinEntities = [];
|
||||
final List<AddWalletListEntity> coinTestnetEntities = [];
|
||||
final List<EthTokenEntity> tokenEntities = [];
|
||||
|
||||
final bool isDesktop = Util.isDesktop;
|
||||
|
@ -139,7 +140,7 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
|||
coinEntities.addAll(_coins.map((e) => CoinEntity(e)));
|
||||
|
||||
if (ref.read(prefsChangeNotifierProvider).showTestNetCoins) {
|
||||
coinEntities.addAll(_coinsTestnet.map((e) => CoinEntity(e)));
|
||||
coinTestnetEntities.addAll(_coinsTestnet.map((e) => CoinEntity(e)));
|
||||
}
|
||||
|
||||
if (AppConfig.coins.whereType<Ethereum>().isNotEmpty) {
|
||||
|
@ -286,6 +287,14 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
|||
initialState: ExpandableState.expanded,
|
||||
animationDurationMultiplier: 0.5,
|
||||
),
|
||||
if (coinTestnetEntities.isNotEmpty)
|
||||
ExpandingSubListItem(
|
||||
title: "Testnet",
|
||||
entities:
|
||||
filter(_searchTerm, coinTestnetEntities),
|
||||
initialState: ExpandableState.expanded,
|
||||
animationDurationMultiplier: 0.5,
|
||||
),
|
||||
if (tokenEntities.isNotEmpty)
|
||||
ExpandingSubListItem(
|
||||
title: "Tokens",
|
||||
|
@ -419,6 +428,13 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
|
|||
entities: filter(_searchTerm, coinEntities),
|
||||
initialState: ExpandableState.expanded,
|
||||
),
|
||||
if (coinTestnetEntities.isNotEmpty)
|
||||
ExpandingSubListItem(
|
||||
title: "Testnet",
|
||||
entities:
|
||||
filter(_searchTerm, coinTestnetEntities),
|
||||
initialState: ExpandableState.expanded,
|
||||
),
|
||||
if (tokenEntities.isNotEmpty)
|
||||
ExpandingSubListItem(
|
||||
title: "Tokens",
|
||||
|
|
Loading…
Reference in a new issue