CakeWallet/lib/src/domain/bitcoin/bitcoin_amount_format.dart

10 lines
325 B
Dart
Raw Normal View History

import 'package:cake_wallet/src/domain/common/crypto_amount_format.dart';
const bitcoinAmountDivider = 100000000;
double bitcoinAmountToDouble({int amount}) =>
2020-07-06 23:09:03 +03:00
cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider);
int doubleToBitcoinAmount(double amount) =>
(amount * bitcoinAmountDivider).toInt();