mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +00:00
prevent quote preview if required inputs empty
it should be prevented by the enabled property but nyah
This commit is contained in:
parent
1bf55318cc
commit
46e1d41126
1 changed files with 8 additions and 2 deletions
|
@ -1088,14 +1088,20 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
onExit: (_) => setState(() => _hovering1 = false),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
previewQuote(quote);
|
||||
if (_receiveAddressController.text.isNotEmpty &&
|
||||
_buyAmountController.text.isNotEmpty) {
|
||||
previewQuote(quote);
|
||||
}
|
||||
},
|
||||
child: PrimaryButton(
|
||||
buttonHeight: isDesktop ? ButtonHeight.l : null,
|
||||
enabled: _receiveAddressController.text.isNotEmpty &&
|
||||
_buyAmountController.text.isNotEmpty,
|
||||
onPressed: () {
|
||||
previewQuote(quote);
|
||||
if (_receiveAddressController.text.isNotEmpty &&
|
||||
_buyAmountController.text.isNotEmpty) {
|
||||
previewQuote(quote);
|
||||
}
|
||||
},
|
||||
label: "Preview quote",
|
||||
)),
|
||||
|
|
Loading…
Reference in a new issue