From 8870768da822391fe2222729e3adf3b6ba259a07 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Sat, 12 Oct 2024 11:10:33 +0200 Subject: [PATCH] chore: set priority fee to 1 gwei --- crates/wallet/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/wallet/src/lib.rs b/crates/wallet/src/lib.rs index 163c534..dfa90f3 100644 --- a/crates/wallet/src/lib.rs +++ b/crates/wallet/src/lib.rs @@ -278,12 +278,12 @@ where request = request.gas_limit(estimate.to()); // set gas fees - let (base_fee, max_priority_fee_per_gas) = - LoadFee::eip1559_fees(&self.inner.eth_api, None, None) - .await - .map_err(|_| OdysseyWalletError::InvalidTransactionRequest)?; - request.max_fee_per_gas = Some((base_fee + max_priority_fee_per_gas).to()); - request.max_priority_fee_per_gas = Some(max_priority_fee_per_gas.to()); + let (base_fee, _) = LoadFee::eip1559_fees(&self.inner.eth_api, None, None) + .await + .map_err(|_| OdysseyWalletError::InvalidTransactionRequest)?; + let max_priority_fee_per_gas = 1_000_000_000; // 1 gwei + request.max_fee_per_gas = Some(base_fee.to::() + max_priority_fee_per_gas); + request.max_priority_fee_per_gas = Some(max_priority_fee_per_gas); request.gas_price = None; // build and sign