diff --git a/pallets/motion/src/tests.rs b/pallets/motion/src/tests.rs index 34fc9a7..b824b3b 100644 --- a/pallets/motion/src/tests.rs +++ b/pallets/motion/src/tests.rs @@ -33,12 +33,15 @@ fn setup_proposal(threshold: u32, motion_type: MotionType) -> Proposal { // Setup motion with specified origin type let motion = match motion_type { - MotionType::SimpleMajority => - RuntimeCall::Motion(pallet_motion::Call::simple_majority { call: Box::new(inner_call) }), - MotionType::SuperMajority => - RuntimeCall::Motion(pallet_motion::Call::super_majority { call: Box::new(inner_call) }), - MotionType::Unanimous => - RuntimeCall::Motion(pallet_motion::Call::unanimous { call: Box::new(inner_call) }), + MotionType::SimpleMajority => { + RuntimeCall::Motion(pallet_motion::Call::simple_majority { call: Box::new(inner_call) }) + }, + MotionType::SuperMajority => { + RuntimeCall::Motion(pallet_motion::Call::super_majority { call: Box::new(inner_call) }) + }, + MotionType::Unanimous => { + RuntimeCall::Motion(pallet_motion::Call::unanimous { call: Box::new(inner_call) }) + }, }; let proposal_len: u32 = motion.using_encoded(|p| p.len() as u32); diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 86f3615..440da21 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -187,8 +187,9 @@ impl fp_self_contained::SelfContainedCall for RuntimeCall { len: usize, ) -> Option> { match self { - RuntimeCall::Ethereum(call) => - call.pre_dispatch_self_contained(info, dispatch_info, len), + RuntimeCall::Ethereum(call) => { + call.pre_dispatch_self_contained(info, dispatch_info, len) + }, _ => None, } } @@ -198,10 +199,11 @@ impl fp_self_contained::SelfContainedCall for RuntimeCall { info: Self::SignedInfo, ) -> Option>> { match self { - call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => + call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => { Some(call.dispatch(RuntimeOrigin::from( pallet_ethereum::RawOrigin::EthereumTransaction(info), - ))), + ))) + }, _ => None, } }