diff --git a/cw_ethereum/lib/ethereum_client.dart b/cw_ethereum/lib/ethereum_client.dart index eaf5018e9..6e0481f7a 100644 --- a/cw_ethereum/lib/ethereum_client.dart +++ b/cw_ethereum/lib/ethereum_client.dart @@ -30,7 +30,7 @@ class EthereumClient { Future> getEstimatedGasForPriorities() async { final result = await Future.wait(EthereumTransactionPriority.all.map((priority) => _client.estimateGas( - maxPriorityFeePerGas: EtherAmount.fromUnitAndValue(EtherUnit.gwei, priority.value)))); + maxPriorityFeePerGas: EtherAmount.fromUnitAndValue(EtherUnit.gwei, priority.tip)))); return result.map((e) => e.toInt()).toList(); } diff --git a/cw_ethereum/lib/ethereum_transaction_priority.dart b/cw_ethereum/lib/ethereum_transaction_priority.dart index 9b8684ace..28b4d2c54 100644 --- a/cw_ethereum/lib/ethereum_transaction_priority.dart +++ b/cw_ethereum/lib/ethereum_transaction_priority.dart @@ -1,18 +1,18 @@ import 'package:cw_core/transaction_priority.dart'; class EthereumTransactionPriority extends TransactionPriority { - final int value; + final int tip; - const EthereumTransactionPriority({required String title, required int raw, required this.value}) + const EthereumTransactionPriority({required String title, required int raw, required this.tip}) : super(title: title, raw: raw); static const List all = [fast, medium, slow]; static const EthereumTransactionPriority slow = - EthereumTransactionPriority(title: 'Slow', raw: 0, value: 2); + EthereumTransactionPriority(title: 'Slow', raw: 0, tip: 2); static const EthereumTransactionPriority medium = - EthereumTransactionPriority(title: 'Medium', raw: 1, value: 5); + EthereumTransactionPriority(title: 'Medium', raw: 1, tip: 5); static const EthereumTransactionPriority fast = - EthereumTransactionPriority(title: 'Fast', raw: 2, value: 10); + EthereumTransactionPriority(title: 'Fast', raw: 2, tip: 10); static EthereumTransactionPriority deserialize({required int raw}) { switch (raw) {