mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-24 12:29:37 +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),
|
onExit: (_) => setState(() => _hovering1 = false),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
previewQuote(quote);
|
if (_receiveAddressController.text.isNotEmpty &&
|
||||||
|
_buyAmountController.text.isNotEmpty) {
|
||||||
|
previewQuote(quote);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: PrimaryButton(
|
child: PrimaryButton(
|
||||||
buttonHeight: isDesktop ? ButtonHeight.l : null,
|
buttonHeight: isDesktop ? ButtonHeight.l : null,
|
||||||
enabled: _receiveAddressController.text.isNotEmpty &&
|
enabled: _receiveAddressController.text.isNotEmpty &&
|
||||||
_buyAmountController.text.isNotEmpty,
|
_buyAmountController.text.isNotEmpty,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
previewQuote(quote);
|
if (_receiveAddressController.text.isNotEmpty &&
|
||||||
|
_buyAmountController.text.isNotEmpty) {
|
||||||
|
previewQuote(quote);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
label: "Preview quote",
|
label: "Preview quote",
|
||||||
)),
|
)),
|
||||||
|
|
Loading…
Reference in a new issue