cake_wallet/cw_ethereum/lib/ethereum_formatter.dart
2023-03-16 19:24:21 +02:00

6 lines
No EOL
198 B
Dart

import 'package:web3dart/web3dart.dart';
class EthereumFormatter {
static int parseEthereumAmount(String amount) =>
EtherAmount.fromUnitAndValue(EtherUnit.ether, amount).getInWei.toInt();
}