Skip to content

Commit

Permalink
Refactor price_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Abliazimov committed Sep 30, 2023
1 parent 6982595 commit fc81eda
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions contracts/pool/src/types/price_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ impl<'a> PriceProvider<'a> {
FixedI128::from_inner(price)
.mul_int(amount)
.and_then(|a| FixedI128::from_rational(a, 10i128.pow(config.asset_decimals)))
.filter(|_| *asset != self.base_asset.address)
.and_then(|a| a.to_precision(self.base_asset.decimals))
.ok_or(Error::InvalidAssetPrice)
}
Expand All @@ -52,7 +51,6 @@ impl<'a> PriceProvider<'a> {
FixedI128::from_inner(price)
.recip_mul_int(amount)
.and_then(|a| FixedI128::from_rational(a, 10i128.pow(self.base_asset.decimals)))
.filter(|_| *asset != self.base_asset.address)
.and_then(|a| a.to_precision(config.asset_decimals))
.ok_or(Error::InvalidAssetPrice)
}
Expand Down

0 comments on commit fc81eda

Please sign in to comment.