2020-01-04 19:31:52 +00:00
|
|
|
import 'package:intl/intl.dart';
|
2020-02-10 17:50:00 +00:00
|
|
|
import 'package:cake_wallet/src/domain/common/crypto_amount_format.dart';
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
const moneroAmountLength = 12;
|
|
|
|
const moneroAmountDivider = 1000000000000;
|
|
|
|
final moneroAmountFormat = NumberFormat()
|
|
|
|
..maximumFractionDigits = moneroAmountLength
|
|
|
|
..minimumFractionDigits = 1;
|
|
|
|
|
|
|
|
String moneroAmountToString({int amount}) =>
|
2020-02-10 17:50:00 +00:00
|
|
|
moneroAmountFormat.format(cryptoAmountToDouble(amount: amount, divider: moneroAmountDivider));
|
2020-01-04 19:31:52 +00:00
|
|
|
|
2020-02-10 17:50:00 +00:00
|
|
|
double moneroAmountToDouble({int amount}) => cryptoAmountToDouble(amount: amount, divider: moneroAmountDivider);
|