diff --git a/zrml/prediction-markets/src/lib.rs b/zrml/prediction-markets/src/lib.rs index 706e5a1da..d798345d9 100644 --- a/zrml/prediction-markets/src/lib.rs +++ b/zrml/prediction-markets/src/lib.rs @@ -2288,7 +2288,7 @@ mod pallet { }; Ok(()) } - + #[require_transactional] pub(crate) fn do_sell_complete_set( who: T::AccountId, @@ -2299,7 +2299,10 @@ mod pallet { let market = >::market(&market_id)?; ensure!( - matches!(market.scoring_rule, ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook), + matches!( + market.scoring_rule, + ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook + ), Error::::InvalidScoringRule ); Self::ensure_market_is_active(&market)?; @@ -2347,7 +2350,10 @@ mod pallet { Error::::NotEnoughBalance ); ensure!( - matches!(market.scoring_rule, ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook), + matches!( + market.scoring_rule, + ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook + ), Error::::InvalidScoringRule ); Self::ensure_market_is_active(&market)?; @@ -3169,7 +3175,9 @@ mod pallet { } let status: MarketStatus = match creation { MarketCreation::Permissionless => match scoring_rule { - ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook => MarketStatus::Active, + ScoringRule::CPMM | ScoringRule::Lmsr | ScoringRule::Orderbook => { + MarketStatus::Active + } ScoringRule::RikiddoSigmoidFeeMarketEma => MarketStatus::CollectingSubsidy, }, MarketCreation::Advised => MarketStatus::Proposed, diff --git a/zrml/swaps/src/lib.rs b/zrml/swaps/src/lib.rs index 33d7e68e1..e598a24bd 100644 --- a/zrml/swaps/src/lib.rs +++ b/zrml/swaps/src/lib.rs @@ -2551,7 +2551,9 @@ mod pallet { ScoringRule::RikiddoSigmoidFeeMarketEma => Ok( T::WeightInfo::swap_exact_amount_in_rikiddo(pool.assets.len().saturated_into()), ), - ScoringRule::Lmsr | ScoringRule::Orderbook => Err(Error::::InvalidScoringRule.into()), + ScoringRule::Lmsr | ScoringRule::Orderbook => { + Err(Error::::InvalidScoringRule.into()) + } } } @@ -2723,7 +2725,9 @@ mod pallet { pool.assets.len().saturated_into(), )) } - ScoringRule::Lmsr | ScoringRule::Orderbook => Err(Error::::InvalidScoringRule.into()), + ScoringRule::Lmsr | ScoringRule::Orderbook => { + Err(Error::::InvalidScoringRule.into()) + } } } }