diff --git a/zrml/orderbook-v1/src/utils.rs b/zrml/orderbook-v1/src/utils.rs index 5bba9f81d..8e4b76ef5 100644 --- a/zrml/orderbook-v1/src/utils.rs +++ b/zrml/orderbook-v1/src/utils.rs @@ -21,32 +21,36 @@ use crate::*; use frame_support::traits::Currency; use sp_runtime::traits::AccountIdConversion; use zeitgeist_primitives::traits::MarketCommonsPalletApi; +use zeitgeist_primitives::types::{ + Asset, Market, MarketCreation, MarketDisputeMechanism, MarketPeriod, MarketStatus, + MarketType, ScoringRule, Deadlines, +}; type CurrencyOf = <::MarketCommons as MarketCommonsPalletApi>::Currency; type BalanceOf = as Currency<::AccountId>>::Balance; -type MarketOf = zeitgeist_primitives::types::Market< +type MarketOf = Market< ::AccountId, BalanceOf, ::BlockNumber, MomentOf, - zeitgeist_primitives::types::Asset>, + Asset>, >; pub(crate) fn market_mock() -> MarketOf where T: crate::Config, { - zeitgeist_primitives::types::Market { - base_asset: zeitgeist_primitives::types::Asset::Ztg, - creation: zeitgeist_primitives::types::MarketCreation::Permissionless, + Market { + base_asset: Asset::Ztg, + creation: MarketCreation::Permissionless, creator_fee: sp_runtime::Perbill::zero(), creator: T::PalletId::get().into_account_truncating(), - market_type: zeitgeist_primitives::types::MarketType::Categorical(64u16), - dispute_mechanism: zeitgeist_primitives::types::MarketDisputeMechanism::Authorized, + market_type: MarketType::Categorical(64u16), + dispute_mechanism: Some(MarketDisputeMechanism::Authorized), metadata: Default::default(), oracle: T::PalletId::get().into_account_truncating(), - period: zeitgeist_primitives::types::MarketPeriod::Block(Default::default()), - deadlines: zeitgeist_primitives::types::Deadlines { + period: MarketPeriod::Block(Default::default()), + deadlines: Deadlines { grace_period: 1_u32.into(), oracle_duration: 1_u32.into(), dispute_duration: 1_u32.into(), @@ -54,7 +58,7 @@ where report: None, resolved_outcome: None, scoring_rule: ScoringRule::Orderbook, - status: zeitgeist_primitives::types::MarketStatus::Active, + status: MarketStatus::Active, bonds: Default::default(), } }