Skip to content

Commit

Permalink
chore: set priority fee to 1 gwei
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Oct 12, 2024
1 parent e68d4b6 commit 8870768
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<u128>() + max_priority_fee_per_gas);
request.max_priority_fee_per_gas = Some(max_priority_fee_per_gas);
request.gas_price = None;

// build and sign
Expand Down

0 comments on commit 8870768

Please sign in to comment.