File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed
Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -2403,16 +2403,14 @@ where
24032403 _len : usize ,
24042404 ) -> TransactionValidity {
24052405 // Check if the call is one of the balance transfer types we want to reject
2406- if let Some ( balances_call) = call. is_sub_type ( ) {
2407- match balances_call {
2408- BalancesCall :: transfer_allow_death { .. }
2409- | BalancesCall :: transfer_keep_alive { .. }
2410- | BalancesCall :: transfer_all { .. } => {
2411- if Pallet :: < T > :: coldkey_in_arbitration ( who) {
2412- return Err ( TransactionValidityError :: Invalid ( InvalidTransaction :: Call ) ) ;
2413- }
2414- }
2415- _ => { } // Other Balances calls are allowed
2406+ if let Some (
2407+ BalancesCall :: transfer_allow_death { .. }
2408+ | BalancesCall :: transfer_keep_alive { .. }
2409+ | BalancesCall :: transfer_all { .. } ,
2410+ ) = call. is_sub_type ( )
2411+ {
2412+ if Pallet :: < T > :: coldkey_in_arbitration ( who) {
2413+ return Err ( InvalidTransaction :: Custom ( 7 ) . into ( ) ) ;
24162414 }
24172415 }
24182416 match call. is_sub_type ( ) {
Original file line number Diff line number Diff line change 11#![ allow( clippy:: unwrap_used) ]
22#![ allow( clippy:: arithmetic_side_effects) ]
33
4- use frame_support:: pallet_prelude:: {
5- InvalidTransaction , TransactionValidity , TransactionValidityError ,
6- } ;
4+ use frame_support:: pallet_prelude:: { InvalidTransaction , TransactionValidity } ;
75use frame_support:: traits:: { OnFinalize , OnIdle , OnInitialize } ;
86use frame_support:: weights:: Weight ;
97use frame_support:: { assert_err, assert_noop, assert_ok, traits:: Currency } ;
@@ -3876,7 +3874,7 @@ fn test_transfer_coldkey_in_arbitration() {
38763874
38773875 assert_eq ! (
38783876 validate_transaction( & coldkey_account_id, & call) ,
3879- Err ( TransactionValidityError :: Invalid ( InvalidTransaction :: Call ) )
3877+ Err ( InvalidTransaction :: Custom ( 7 ) . into ( ) )
38803878 ) ;
38813879 } ) ;
38823880}
Original file line number Diff line number Diff line change @@ -516,6 +516,7 @@ impl pallet_collective::Config<TriumvirateCollective> for Runtime {
516516}
517517
518518// We call council members Triumvirate
519+ #[ allow( dead_code) ]
519520type TriumvirateMembership = pallet_membership:: Instance1 ;
520521impl pallet_membership:: Config < TriumvirateMembership > for Runtime {
521522 type RuntimeEvent = RuntimeEvent ;
@@ -531,6 +532,7 @@ impl pallet_membership::Config<TriumvirateMembership> for Runtime {
531532}
532533
533534// We call our top K delegates membership Senate
535+ #[ allow( dead_code) ]
534536type SenateMembership = pallet_membership:: Instance2 ;
535537impl pallet_membership:: Config < SenateMembership > for Runtime {
536538 type RuntimeEvent = RuntimeEvent ;
You can’t perform that action at this time.
0 commit comments