mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-04 12:16:31 +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 oldValue,
|
||||||
TextEditingValue newValue,
|
TextEditingValue newValue,
|
||||||
) {
|
) {
|
||||||
final TextSelection newSelection = newValue.selection;
|
TextSelection newSelection = newValue.selection;
|
||||||
String newVal = newValue.text;
|
String newVal = _BuyFormState.buyWithFiat
|
||||||
|
? Decimal.parse(newValue.text).toStringAsFixed(2)
|
||||||
|
: Decimal.parse(newValue.text).toStringAsFixed(8);
|
||||||
if (newValue.text == '') {
|
if (newValue.text == '') {
|
||||||
return newValue;
|
return newValue;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue