Skip to content

Commit

Permalink
fix pool registry test compilation (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm authored Jan 26, 2024
1 parent 2f19a3c commit 683dce0
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions pallets/pool-registry/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ use cfg_primitives::{
TrancheWeight,
};
use cfg_traits::{
benchmarking::PoolFeesBenchmarkHelper, fee::PoolFeeBucket, investments::OrderManager, Millis,
PoolMutate, PoolUpdateGuard, PreConditions, Seconds, UpdateState,
fee::PoolFeeBucket, investments::OrderManager, Millis, PoolMutate, PoolUpdateGuard,
PreConditions, Seconds, UpdateState,
};
use cfg_types::{
fixed_point::{Quantity, Rate},
permissions::{PermissionScope, Role},
pools::PoolFeeInfo,
tokens::{CurrencyId, CustomMetadata, TrancheCurrency},
};
use frame_support::{
Expand All @@ -36,8 +35,6 @@ use frame_support::{
};
use frame_system::EnsureSigned;
use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key};
#[cfg(feature = "runtime-benchmarks")]
use pallet_pool_system::benchmarking::create_pool;
use pallet_pool_system::{
pool_types::{PoolChanges, PoolDetails, ScheduledUpdateDetails},
tranches::TrancheInput,
Expand Down Expand Up @@ -240,10 +237,6 @@ where
T: Config
+ pallet_pool_system::Config<PoolId = u64, Balance = u128, CurrencyId = CurrencyId>
+ pallet_pool_fees::Config<PoolId = u64, Balance = u128>,
<T as pallet_pool_system::Config>::PoolFees: PoolFeesBenchmarkHelper<
PoolId = u64,
PoolFeeInfo = PoolFeeInfo<T::AccountId, u128, <T as pallet_pool_system::Config>::Rate>,
>,
{
type Balance = <T as Config>::Balance;
type CurrencyId = <T as Config>::CurrencyId;
Expand All @@ -258,7 +251,7 @@ where
>;
type PoolFeeInput = (
PoolFeeBucket,
<<T as pallet_pool_system::Config>::PoolFees as PoolFeesBenchmarkHelper>::PoolFeeInfo,
<<T as pallet_pool_system::Config>::PoolFees as cfg_traits::fee::PoolFees>::FeeInfo,
);
type TrancheInput = TrancheInput<
<T as pallet_pool_system::Config>::Rate,
Expand All @@ -267,16 +260,14 @@ where
>;

fn create(
admin: T::AccountId,
_admin: T::AccountId,
_depositor: T::AccountId,
_pool_id: <T as pallet_pool_system::Config>::PoolId,
tranche_inputs: Vec<Self::TrancheInput>,
_tranche_inputs: Vec<Self::TrancheInput>,
_currency: <T as pallet_pool_registry::Config>::CurrencyId,
_max_reserve: <T as pallet_pool_registry::Config>::Balance,
pool_fees: Vec<Self::PoolFeeInput>,
_pool_fees: Vec<Self::PoolFeeInput>,
) -> DispatchResult {
#[cfg(feature = "runtime-benchmarks")]
create_pool::<T>(tranche_inputs.len() as u32, pool_fees.len() as u32, admin)?;
Ok(())
}

Expand Down

0 comments on commit 683dce0

Please sign in to comment.