cake_wallet/cw_ethereum/lib/ethereum_formatter.dart
OmarHatem c6a26cac16 - Fix balance display
- Fix parsing of Ethereum amount
- Add more Ethereum Nodes [skip ci]
2023-04-14 14:05:24 +02:00

6 lines
165 B
Dart

import 'dart:math';
class EthereumFormatter {
static int parseEthereumAmount(String amount) =>
BigInt.from(double.parse(amount) * (pow(10, 18))).toInt();
}