Skip to content

Commit

Permalink
fixed eth
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Apr 19, 2024
1 parent f28c165 commit 42c6842
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mantis/node/src/mantis/solve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ fn decimal_to_fraction(amount: Decimal) -> Ratio<u64> {
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::<u64>()
}
}

0 comments on commit 42c6842

Please sign in to comment.