Skip to content

Commit

Permalink
compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasDotSol committed Nov 19, 2024
1 parent 239b947 commit 4e49793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/neutron-std/src/types/neutron/util/precdec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ forward_ref_partial_eq!(PrecDec, PrecDec);
pub struct DecimalRangeExceeded;

impl PrecDec {
const DECIMAL_FRACTIONAL: Uint256 = Uint256::from_uint128(1_000_000_000_000_000_000_000_000_000u128); // 1*10**27
const DECIMAL_FRACTIONAL: Uint256 = Uint256::from_u128(1_000_000_000_000_000_000_000_000_000u128); // 1*10**27
// const DECIMAL_FRACTIONAL_SQUARED: Uint256 = Uint256::from_uint128(1_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000u128); // (1*10**18)**2 = 1*10**54


Expand Down Expand Up @@ -488,7 +488,7 @@ impl Fraction<Uint256> for PrecDec {
if self.is_zero() {
None
} else {
let decimal_fractional_squared = Self::DECIMAL_FRACTIONAL.Mul(Self::DECIMAL_FRACTIONAL);
let decimal_fractional_squared = Self::DECIMAL_FRACTIONAL.mul(Self::DECIMAL_FRACTIONAL);
// Let self be p/q with p = self.0 and q = DECIMAL_FRACTIONAL.
// Now we calculate the inverse a/b = q/p such that b = DECIMAL_FRACTIONAL. Then
// `a = DECIMAL_FRACTIONAL*DECIMAL_FRACTIONAL / self.0`.
Expand Down

0 comments on commit 4e49793

Please sign in to comment.