diff --git a/primitives/src/constants/mock.rs b/primitives/src/constants/mock.rs index 6db264bf0..200221c5b 100644 --- a/primitives/src/constants/mock.rs +++ b/primitives/src/constants/mock.rs @@ -21,7 +21,7 @@ pub use super::*; use crate::{ assets::Asset, - types::{Assets, Balance, Moment, Currencies}, + types::{Assets, Balance, Currencies, Moment}, }; use frame_support::{parameter_types, traits::LockIdentifier, PalletId}; use orml_traits::parameter_type_with_key; diff --git a/runtime/zeitgeist/src/xcm_config/asset_registry.rs b/runtime/zeitgeist/src/xcm_config/asset_registry.rs index 2e5b4bb6e..20d23e90d 100644 --- a/runtime/zeitgeist/src/xcm_config/asset_registry.rs +++ b/runtime/zeitgeist/src/xcm_config/asset_registry.rs @@ -46,4 +46,4 @@ impl AssetProcessor> for Cust ) -> Result<(), DispatchError> { Ok(()) } -} \ No newline at end of file +} diff --git a/zrml/neo-swaps/src/mock.rs b/zrml/neo-swaps/src/mock.rs index 65a549257..1c689690d 100644 --- a/zrml/neo-swaps/src/mock.rs +++ b/zrml/neo-swaps/src/mock.rs @@ -63,8 +63,8 @@ use zeitgeist_primitives::{ }, traits::{DeployPoolApi, DistributeFees}, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, Hash, - Index, MarketId, Moment, PoolId, UncheckedExtrinsicTest, Currencies, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, + Currencies, Hash, Index, MarketId, Moment, PoolId, UncheckedExtrinsicTest, }, }; use zrml_neo_swaps::BalanceOf; diff --git a/zrml/prediction-markets/src/mock.rs b/zrml/prediction-markets/src/mock.rs index 4d499afb6..512c3763e 100644 --- a/zrml/prediction-markets/src/mock.rs +++ b/zrml/prediction-markets/src/mock.rs @@ -24,24 +24,26 @@ use crate as prediction_markets; use frame_support::{ - construct_runtime, ord_parameter_types, parameter_types, - traits::{Everything, NeverEnsureOrigin, OnFinalize, OnInitialize, AsEnsureOriginWithArg}, + construct_runtime, ord_parameter_types, parameter_types, + traits::{AsEnsureOriginWithArg, Everything, NeverEnsureOrigin, OnFinalize, OnInitialize}, }; -use frame_system::{EnsureRoot, EnsureSignedBy, EnsureSigned}; +use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy}; #[cfg(feature = "parachain")] use orml_asset_registry::AssetMetadata; -use sp_arithmetic::{per_things::Percent}; +use parity_scale_codec::Compact; +use sp_arithmetic::per_things::Percent; use sp_runtime::{ testing::Header, - traits::{ConstU32, BlakeTwo256, IdentityLookup}, + traits::{BlakeTwo256, ConstU32, IdentityLookup}, DispatchError, DispatchResult, }; -use parity_scale_codec::Compact; use std::cell::RefCell; use substrate_fixed::{types::extra::U33, FixedI128, FixedU128}; use zeitgeist_primitives::{ constants::mock::{ - AddOutcomePeriod, AggregationPeriod, AppealBond, AppealPeriod, AuthorizedPalletId, + AddOutcomePeriod, AggregationPeriod, AppealBond, AppealPeriod, AssetsAccountDeposit, + AssetsApprovalDeposit, AssetsDeposit, AssetsMetadataDepositBase, + AssetsMetadataDepositPerByte, AssetsStringLimit, AuthorizedPalletId, BalanceFractionalDecimals, BlockHashCount, BlocksPerYear, CloseEarlyBlockPeriod, CloseEarlyDisputeBond, CloseEarlyProtectionBlockPeriod, CloseEarlyProtectionTimeFramePeriod, CloseEarlyRequestBond, CloseEarlyTimeFramePeriod, @@ -56,12 +58,13 @@ use zeitgeist_primitives::{ MinOutcomeVoteAmount, MinSubsidy, MinSubsidyPeriod, MinWeight, MinimumPeriod, OutcomeBond, OutcomeFactor, OutsiderBond, PmPalletId, RemoveKeysLimit, RequestInterval, SimpleDisputesPalletId, SwapsPalletId, TreasuryPalletId, VotePeriod, VotingOutcomeFee, - BASE, CENT, MILLISECS_PER_BLOCK, AssetsApprovalDeposit, AssetsAccountDeposit, AssetsDeposit, AssetsMetadataDepositBase, AssetsMetadataDepositPerByte, AssetsStringLimit, + BASE, CENT, MILLISECS_PER_BLOCK, }, traits::DeployPoolApi, types::{ - AccountIdTest, Amount, Assets, Currencies, Balance, BasicCurrencyAdapter, BlockNumber, - BlockTest, Hash, Index, MarketId, Moment, PoolId, UncheckedExtrinsicTest, CampaignAsset, CustomAsset, MarketAsset, CustomAssetId, CampaignAssetId + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, + CampaignAsset, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, + MarketAsset, MarketId, Moment, PoolId, UncheckedExtrinsicTest, }, }; use zrml_rikiddo::types::{EmaMarketVolume, FeeSigmoid, RikiddoSigmoidMV}; diff --git a/zrml/prediction-markets/src/tests.rs b/zrml/prediction-markets/src/tests.rs index b8b928e1e..1edc115dc 100644 --- a/zrml/prediction-markets/src/tests.rs +++ b/zrml/prediction-markets/src/tests.rs @@ -4039,10 +4039,22 @@ fn create_market_and_deploy_assets_results_in_expected_balances_and_pool_params( assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 2), &ALICE), 0); assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 3), &ALICE), 0); - assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 0), &pool_account), amount); - assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 1), &pool_account), amount); - assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 2), &pool_account), amount); - assert_eq!(AssetManager::free_balance(Asset::CategoricalOutcome(0, 3), &pool_account), amount); + assert_eq!( + AssetManager::free_balance(Asset::CategoricalOutcome(0, 0), &pool_account), + amount + ); + assert_eq!( + AssetManager::free_balance(Asset::CategoricalOutcome(0, 1), &pool_account), + amount + ); + assert_eq!( + AssetManager::free_balance(Asset::CategoricalOutcome(0, 2), &pool_account), + amount + ); + assert_eq!( + AssetManager::free_balance(Asset::CategoricalOutcome(0, 3), &pool_account), + amount + ); assert_eq!(AssetManager::free_balance(base_asset, &pool_account), amount); let pool = Pools::::get(0).unwrap();