mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
ensure fiat amount validation updates on fiat type changed
This commit is contained in:
parent
f61b53738c
commit
bed518d061
1 changed files with 3 additions and 2 deletions
|
@ -122,12 +122,12 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
setState(() {
|
||||
_amountOutOfRangeErrorString = "Invalid amount";
|
||||
});
|
||||
} else if (value > maxFiat) {
|
||||
} else if (value > maxFiat && buyWithFiat) {
|
||||
setState(() {
|
||||
_amountOutOfRangeErrorString =
|
||||
"Maximum amount: ${maxFiat.toStringAsFixed(2)}";
|
||||
});
|
||||
} else if (value < minFiat) {
|
||||
} else if (value < minFiat && buyWithFiat) {
|
||||
setState(() {
|
||||
_amountOutOfRangeErrorString =
|
||||
"Minimum amount: ${minFiat.toStringAsFixed(2)}";
|
||||
|
@ -280,6 +280,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
minFiat = fiat.minAmount != minFiat ? fiat.minAmount : minFiat;
|
||||
maxFiat = fiat.maxAmount != maxFiat ? fiat.maxAmount : maxFiat;
|
||||
});
|
||||
validateAmount();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue