Skip to content

Commit c426ec4

Browse files
committed
fix: correct magnitudes in price conversion
1 parent 8b60680 commit c426ec4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/price_aggregator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ impl PriceAggregator {
203203
for collateral in &synth.collateral {
204204
let collateral_digits = self.get_digits(collateral);
205205
let p = converter.value_in_usd(collateral)?;
206-
let p_scaled = p * BigInt::from(10i64.pow(collateral_digits))
207-
/ BigInt::from(10i64.pow(synth_digits));
206+
let p_scaled = p * BigInt::from(10i64.pow(synth_digits))
207+
/ BigInt::from(10i64.pow(collateral_digits));
208208
prices.push(p_scaled / &synth_price);
209209
}
210210

0 commit comments

Comments
 (0)