From fa96f5ed146ed01beecc6f79e8b79ccfe0750d6d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 26 Jan 2023 10:32:47 -0600 Subject: [PATCH] put currently selected fiat's minAmount and maxAmount in buy_form var --- lib/pages/buy_view/buy_form.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pages/buy_view/buy_form.dart b/lib/pages/buy_view/buy_form.dart index c70f25ee5..8259afd9c 100644 --- a/lib/pages/buy_view/buy_form.dart +++ b/lib/pages/buy_view/buy_form.dart @@ -92,6 +92,9 @@ class _BuyFormState extends ConsumerState { bool _hovering1 = false; bool _hovering2 = false; + Decimal minFiat = Decimal.fromInt(50); + Decimal maxFiat = Decimal.fromInt(20000); + void fiatFieldOnChanged(String value) async {} void cryptoFieldOnChanged(String value) async {} @@ -227,6 +230,8 @@ class _BuyFormState extends ConsumerState { onSelected: (fiat) { setState(() { selectedFiat = fiat; + minFiat = fiat.minAmount != minFiat ? fiat.minAmount : minFiat; + maxFiat = fiat.maxAmount != maxFiat ? fiat.maxAmount : maxFiat; }); }, );