Skip to content

Commit 10dfecb

Browse files
committed
fix matching
1 parent a78f33c commit 10dfecb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

runtime/src/lib.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ pub enum ProxyType {
643643
Transfer,
644644
SmallTransfer,
645645
RootWeights,
646-
SetCode,
646+
SudoUncheckedSetCode,
647647
}
648648
// Transfers below SMALL_TRANSFER_LIMIT are considered small transfers
649649
pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO
@@ -716,9 +716,17 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
716716
c,
717717
RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. })
718718
),
719-
ProxyType::SetCode => {
720-
matches!(c, RuntimeCall::System(frame_system::Call::set_code { .. }))
721-
}
719+
ProxyType::SudoUncheckedSetCode => match c {
720+
RuntimeCall::Sudo(pallet_sudo::Call::sudo_unchecked_weight { call, weight: _ }) => {
721+
let inner_call: RuntimeCall = *call.clone();
722+
723+
matches!(
724+
inner_call,
725+
RuntimeCall::System(frame_system::Call::set_code { .. })
726+
)
727+
}
728+
_ => false,
729+
},
722730
}
723731
}
724732
fn is_superset(&self, o: &Self) -> bool {

0 commit comments

Comments
 (0)