diff --git a/crates/shared/src/price_estimation/native/oneinch.rs b/crates/shared/src/price_estimation/native/oneinch.rs index 871cdec7a1..2314ecf2ab 100644 --- a/crates/shared/src/price_estimation/native/oneinch.rs +++ b/crates/shared/src/price_estimation/native/oneinch.rs @@ -140,7 +140,8 @@ async fn get_current_prices( tracing::debug!(?token, "could not fetch decimals; discarding spot price"); return None; }; - let unit = num::BigRational::from_integer(10u64.pow(decimals.into()).into()); + let unit = + num::BigRational::from_integer(num::BigInt::from(10u64).pow(decimals.into())); let normalized_price = u256_to_big_rational(&price) / unit; Some((token, normalized_price.to_f64()?)) })