mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
14 lines
565 B
Dart
14 lines
565 B
Dart
import 'package:intl/intl.dart';
|
|
import 'package:cake_wallet/src/domain/common/crypto_amount_format.dart';
|
|
|
|
const bitcoinAmountLength = 8;
|
|
const bitcoinAmountDivider = 100000000;
|
|
final bitcoinAmountFormat = NumberFormat()
|
|
..maximumFractionDigits = bitcoinAmountLength
|
|
..minimumFractionDigits = 1;
|
|
|
|
String bitcoinAmountToString({int amount}) =>
|
|
bitcoinAmountFormat.format(cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider));
|
|
|
|
double bitcoinAmountToDouble({int amount}) => cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider);
|