mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
set amount text to max if >max
This commit is contained in:
parent
e68385a6ae
commit
9a3e9f345d
1 changed files with 4 additions and 0 deletions
|
@ -508,6 +508,10 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
_BuyFormState.maxCrypto = Decimal.parse(errorMessage.substring(
|
||||
errorMessage.indexOf("$minCrypto and ") + "$minCrypto and ".length,
|
||||
errorMessage.length));
|
||||
if (Decimal.parse(_buyAmountController.text) >
|
||||
_BuyFormState.maxCrypto) {
|
||||
_buyAmountController.text = _BuyFormState.maxCrypto.toString();
|
||||
}
|
||||
}
|
||||
await showDialog<dynamic>(
|
||||
context: context,
|
||||
|
|
Loading…
Reference in a new issue