Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Oct 14, 2024
1 parent 4c5d215 commit 3607d1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ where
EthCall::estimate_gas_at(&self.inner.eth_api, request.clone(), BlockId::latest(), None),
LoadFee::eip1559_fees(&self.inner.eth_api, None, None)
);

let estimate = estimate.map_err(Into::into)?;
if estimate >= U256::from(350_000) {
return Err(OdysseyWalletError::GasEstimateTooHigh { estimate: estimate.to() }.into());
}
request.gas = Some(estimate.to());

let (base_fee, _) = base_fee.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);
Expand Down

0 comments on commit 3607d1c

Please sign in to comment.