mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-26 12:36:14 +00:00
Rename priority value to tip
This commit is contained in:
parent
a96f91fbee
commit
9c160e94eb
2 changed files with 6 additions and 6 deletions
|
@ -30,7 +30,7 @@ class EthereumClient {
|
||||||
Future<List<int>> getEstimatedGasForPriorities() async {
|
Future<List<int>> getEstimatedGasForPriorities() async {
|
||||||
final result = await Future.wait(EthereumTransactionPriority.all.map((priority) =>
|
final result = await Future.wait(EthereumTransactionPriority.all.map((priority) =>
|
||||||
_client.estimateGas(
|
_client.estimateGas(
|
||||||
maxPriorityFeePerGas: EtherAmount.fromUnitAndValue(EtherUnit.gwei, priority.value))));
|
maxPriorityFeePerGas: EtherAmount.fromUnitAndValue(EtherUnit.gwei, priority.tip))));
|
||||||
|
|
||||||
return result.map((e) => e.toInt()).toList();
|
return result.map((e) => e.toInt()).toList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import 'package:cw_core/transaction_priority.dart';
|
import 'package:cw_core/transaction_priority.dart';
|
||||||
|
|
||||||
class EthereumTransactionPriority extends TransactionPriority {
|
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);
|
: super(title: title, raw: raw);
|
||||||
|
|
||||||
static const List<EthereumTransactionPriority> all = [fast, medium, slow];
|
static const List<EthereumTransactionPriority> all = [fast, medium, slow];
|
||||||
static const EthereumTransactionPriority slow =
|
static const EthereumTransactionPriority slow =
|
||||||
EthereumTransactionPriority(title: 'Slow', raw: 0, value: 2);
|
EthereumTransactionPriority(title: 'Slow', raw: 0, tip: 2);
|
||||||
static const EthereumTransactionPriority medium =
|
static const EthereumTransactionPriority medium =
|
||||||
EthereumTransactionPriority(title: 'Medium', raw: 1, value: 5);
|
EthereumTransactionPriority(title: 'Medium', raw: 1, tip: 5);
|
||||||
static const EthereumTransactionPriority fast =
|
static const EthereumTransactionPriority fast =
|
||||||
EthereumTransactionPriority(title: 'Fast', raw: 2, value: 10);
|
EthereumTransactionPriority(title: 'Fast', raw: 2, tip: 10);
|
||||||
|
|
||||||
static EthereumTransactionPriority deserialize({required int raw}) {
|
static EthereumTransactionPriority deserialize({required int raw}) {
|
||||||
switch (raw) {
|
switch (raw) {
|
||||||
|
|
Loading…
Reference in a new issue