diff --git a/lib/src/domain/exchange/limits_format.dart b/lib/src/domain/exchange/limits_format.dart deleted file mode 100644 index c25f03e9f..000000000 --- a/lib/src/domain/exchange/limits_format.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:intl/intl.dart'; - -final amountFormat = NumberFormat() - ..maximumFractionDigits = 3 - ..minimumFractionDigits = 1; - -double limitsFormat(double limit) => double.parse(amountFormat.format(limit)); \ No newline at end of file diff --git a/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart b/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart index ee58771d1..d65f23db3 100644 --- a/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart +++ b/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart @@ -12,7 +12,6 @@ import 'package:cake_wallet/src/domain/exchange/xmrto/xmrto_trade_request.dart'; import 'package:cake_wallet/src/domain/exchange/trade_not_created_exeption.dart'; import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.dart'; import 'package:cake_wallet/src/domain/exchange/trade_not_found_exeption.dart'; -import 'package:cake_wallet/src/domain/exchange/limits_format.dart'; class XMRTOExchangeProvider extends ExchangeProvider { XMRTOExchangeProvider() @@ -69,9 +68,9 @@ class XMRTOExchangeProvider extends ExchangeProvider { if (price > 0) { try { min = min/price + correction; - min = limitsFormat(min); + min = _limitsFormat(min); max = max/price - correction; - max = limitsFormat(max); + max = _limitsFormat(max); } catch (e) { min = 0; max = 0; @@ -194,4 +193,6 @@ class XMRTOExchangeProvider extends ExchangeProvider { return 0.0; } } + + double _limitsFormat(double limit) => double.parse(limit.toStringAsFixed(3)); }