cake_wallet/cw_ethereum/lib/ethereum_formatter.dart

6 lines
198 B
Dart
Raw Normal View History

2023-03-16 17:24:21 +00:00
import 'package:web3dart/web3dart.dart';
class EthereumFormatter {
static int parseEthereumAmount(String amount) =>
EtherAmount.fromUnitAndValue(EtherUnit.ether, amount).getInWei.toInt();
}