diff --git a/pallets/loans/src/entities/input.rs b/pallets/loans/src/entities/input.rs index fd807841f7..4e5fe975e0 100644 --- a/pallets/loans/src/entities/input.rs +++ b/pallets/loans/src/entities/input.rs @@ -7,6 +7,7 @@ use crate::{ entities::pricing::external::ExternalAmount, pallet::{Config, Error}, types::RepaidAmount, + PriceOf, }; #[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound, MaxEncodedLen)] @@ -61,6 +62,6 @@ impl RepaidInput { #[scale_info(skip_type_params(T))] pub enum PriceCollectionInput { Empty, - Custom(BoundedBTreeMap), + Custom(BoundedBTreeMap, T::MaxActiveLoansPerPool>), FromRegistry, } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 74cf0a16c6..ceb664300b 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -103,10 +103,9 @@ where >, { let input_prices: PriceCollectionInput = - if let Ok(prices) = pallet_loans::Pallet::::registered_prices(pool_id) { - PriceCollectionInput::FromRegistry - } else { - PriceCollectionInput::Empty + match pallet_loans::Pallet::::registered_prices(pool_id) { + Ok(_) => PriceCollectionInput::FromRegistry, + Err(_) => PriceCollectionInput::Empty, }; update_nav_with_input::(pool_id, input_prices)