From b6e58e484aafbc86322c1362f8ce007f6910bc67 Mon Sep 17 00:00:00 2001 From: Chralt98 Date: Thu, 12 Oct 2023 12:26:08 +0200 Subject: [PATCH] fmt --- zrml/parimutuel/src/mock.rs | 3 +-- zrml/parimutuel/src/tests.rs | 2 +- zrml/prediction-markets/src/lib.rs | 12 ++++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/zrml/parimutuel/src/mock.rs b/zrml/parimutuel/src/mock.rs index b62b53c7f..523118640 100644 --- a/zrml/parimutuel/src/mock.rs +++ b/zrml/parimutuel/src/mock.rs @@ -30,12 +30,11 @@ use frame_support::{ parameter_types, traits::{Everything, OnFinalize, OnInitialize}, }; -use sp_runtime::Perbill; use orml_traits::MultiCurrency; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, - SaturatedConversion, + Perbill, SaturatedConversion, }; use zeitgeist_primitives::{ constants::mock::{ diff --git a/zrml/parimutuel/src/tests.rs b/zrml/parimutuel/src/tests.rs index 1f1c5af2e..331d73aec 100644 --- a/zrml/parimutuel/src/tests.rs +++ b/zrml/parimutuel/src/tests.rs @@ -20,7 +20,7 @@ use crate::{mock::*, *}; use frame_support::assert_ok; -use zeitgeist_primitives::types::{Asset, MarketType, Outcome, MarketStatus}; +use zeitgeist_primitives::types::{Asset, MarketStatus, MarketType, Outcome}; use zrml_market_commons::Markets; #[test] diff --git a/zrml/prediction-markets/src/lib.rs b/zrml/prediction-markets/src/lib.rs index 5b9ff3233..8400edc61 100644 --- a/zrml/prediction-markets/src/lib.rs +++ b/zrml/prediction-markets/src/lib.rs @@ -528,7 +528,10 @@ mod pallet { ); match m.scoring_rule { - ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Parimutuel | ScoringRule::Orderbook => { + ScoringRule::CPMM + | ScoringRule::Lmsr + | ScoringRule::Parimutuel + | ScoringRule::Orderbook => { m.status = MarketStatus::Active; } ScoringRule::RikiddoSigmoidFeeMarketEma => { @@ -3175,9 +3178,10 @@ mod pallet { } let status: MarketStatus = match creation { MarketCreation::Permissionless => match scoring_rule { - ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Parimutuel | ScoringRule::Orderbook => { - MarketStatus::Active - } + ScoringRule::CPMM + | ScoringRule::Lmsr + | ScoringRule::Parimutuel + | ScoringRule::Orderbook => MarketStatus::Active, ScoringRule::RikiddoSigmoidFeeMarketEma => MarketStatus::CollectingSubsidy, }, MarketCreation::Advised => MarketStatus::Proposed,