mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +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(
|
_BuyFormState.maxCrypto = Decimal.parse(errorMessage.substring(
|
||||||
errorMessage.indexOf("$minCrypto and ") + "$minCrypto and ".length,
|
errorMessage.indexOf("$minCrypto and ") + "$minCrypto and ".length,
|
||||||
errorMessage.length));
|
errorMessage.length));
|
||||||
|
if (Decimal.parse(_buyAmountController.text) >
|
||||||
|
_BuyFormState.maxCrypto) {
|
||||||
|
_buyAmountController.text = _BuyFormState.maxCrypto.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await showDialog<dynamic>(
|
await showDialog<dynamic>(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
Loading…
Reference in a new issue