mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
No reason to show a selection dialog or even show which coin if its implied in a single coin config.
Addresses https://github.com/cypherstack/stack_wallet/issues/947
This commit is contained in:
parent
f3d1611249
commit
4f5354da0d
1 changed files with 14 additions and 5 deletions
|
@ -75,6 +75,14 @@ class _NewContactAddressEntryFormState
|
|||
addressLabelFocusNode = FocusNode();
|
||||
addressFocusNode = FocusNode();
|
||||
coins = [...AppConfig.coins];
|
||||
|
||||
if (AppConfig.isSingleCoinApp) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) {
|
||||
ref.read(addressEntryDataProvider(widget.id)).coin = coins.first;
|
||||
}
|
||||
});
|
||||
}
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
@ -109,7 +117,7 @@ class _NewContactAddressEntryFormState
|
|||
|
||||
return Column(
|
||||
children: [
|
||||
if (isDesktop)
|
||||
if (isDesktop && !AppConfig.isSingleCoinApp)
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton2<CryptoCurrency>(
|
||||
hint: Text(
|
||||
|
@ -188,7 +196,7 @@ class _NewContactAddressEntryFormState
|
|||
],
|
||||
),
|
||||
),
|
||||
if (!isDesktop)
|
||||
if (!isDesktop && !AppConfig.isSingleCoinApp)
|
||||
TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions: Util.isDesktop ? false : true,
|
||||
|
@ -280,9 +288,10 @@ class _NewContactAddressEntryFormState
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
if (!AppConfig.isSingleCoinApp)
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
|
|
Loading…
Reference in a new issue