Skip to content

Commit

Permalink
fix: 1Inch gas estimation has decimals (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 authored Feb 12, 2025
1 parent 0752eae commit f32790a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/one_inch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ impl ConversionProvider for OneInchProvider {
data: body.tx.data,
amount: body.dst_amount,
eip155: Some(ConvertTxEip155 {
gas: (body.tx.gas as f64 * GAS_ESTIMATION_SLIPPAGE).to_string(),
gas: (f64::ceil(body.tx.gas as f64 * GAS_ESTIMATION_SLIPPAGE) as usize)
.to_string(),
gas_price: body.tx.gas_price,
}),
},
Expand Down

0 comments on commit f32790a

Please sign in to comment.