From 42c6842cfe77839d070a164ed1a54ed28c54f9cd Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Fri, 19 Apr 2024 23:46:33 +0100 Subject: [PATCH] fixed eth --- mantis/node/src/mantis/solve.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mantis/node/src/mantis/solve.rs b/mantis/node/src/mantis/solve.rs index 226c8b0..8098b08 100644 --- a/mantis/node/src/mantis/solve.rs +++ b/mantis/node/src/mantis/solve.rs @@ -183,10 +183,10 @@ fn decimal_to_fraction(amount: Decimal) -> Ratio { Ratio::new(decimal_string[0].parse().expect("in range"), 1) } else { let digits_after_decimal = decimal_string[1].len() as u32; - let denominator = 10_u128.pow(digits_after_decimal) as u64; + let denominator = 10_u128.pow(digits_after_decimal); let numerator = (amount * Decimal::from(denominator)) - .to_u64() + .to_u128() .expect("integer"); - Ratio::new(numerator, denominator) + Ratio::new(numerator, denominator).msb_limit_unsigned::() } }