From a3eadd20e855003746352b5920ee3cb1dd845b2e Mon Sep 17 00:00:00 2001 From: Juan Ignacio Rios Date: Fri, 26 Apr 2024 17:15:48 +0200 Subject: [PATCH] part 6 --- pallets/funding/src/instantiator/calculations.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/funding/src/instantiator/calculations.rs b/pallets/funding/src/instantiator/calculations.rs index 28d0fe256..480b80c53 100644 --- a/pallets/funding/src/instantiator/calculations.rs +++ b/pallets/funding/src/instantiator/calculations.rs @@ -209,10 +209,11 @@ impl< for (bid, price) in self.get_actual_price_charged_for_bucketed_bids(bids, project_metadata, maybe_bucket) { let funding_asset_id = bid.asset.to_assethub_id(); let funding_asset_decimals = self.execute(|| T::FundingCurrency::decimals(funding_asset_id)); - let funding_asset_usd_price = + let funding_asset_usd_price =self.execute(|| { T::PriceProvider::get_decimals_aware_price(funding_asset_id, USD_DECIMALS, funding_asset_decimals) .ok_or(Error::::PriceNotFound) - .unwrap(); + .unwrap() + }); let usd_ticket_size = price.saturating_mul_int(bid.amount); let funding_asset_spent = funding_asset_usd_price.reciprocal().unwrap().saturating_mul_int(usd_ticket_size); output.push(UserToForeignAssets::::new(