mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-24 19:25:52 +00:00
trim excess digits
This commit is contained in:
parent
4ddd4a292e
commit
d5c3712067
1 changed files with 4 additions and 2 deletions
|
@ -1366,8 +1366,10 @@ class NumericalRangeFormatter extends TextInputFormatter {
|
|||
TextEditingValue oldValue,
|
||||
TextEditingValue newValue,
|
||||
) {
|
||||
final TextSelection newSelection = newValue.selection;
|
||||
String newVal = newValue.text;
|
||||
TextSelection newSelection = newValue.selection;
|
||||
String newVal = _BuyFormState.buyWithFiat
|
||||
? Decimal.parse(newValue.text).toStringAsFixed(2)
|
||||
: Decimal.parse(newValue.text).toStringAsFixed(8);
|
||||
if (newValue.text == '') {
|
||||
return newValue;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue