Skip to content

Commit 19f99e5

Browse files
committed
Remove Val type
1 parent d6b4ef4 commit 19f99e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

runtime/src/sudo_wrapper.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ where
4444
const IDENTIFIER: &'static str = "SudoTransactionExtension";
4545

4646
type Implicit = ();
47-
type Val = Option<T::AccountId>;
47+
type Val = ();
4848
type Pre = ();
4949

5050
impl_tx_ext_default!(<T as Config>::RuntimeCall; weight prepare);
@@ -61,7 +61,7 @@ where
6161
) -> ValidateResult<Self::Val, <T as Config>::RuntimeCall> {
6262
// Ensure the transaction is signed, else we just skip the extension.
6363
let Some(who) = origin.as_system_origin_signer() else {
64-
return Ok((Default::default(), None, origin));
64+
return Ok((Default::default(), (), origin));
6565
};
6666

6767
// Check validity of the signer for sudo call
@@ -79,6 +79,6 @@ where
7979
}
8080
}
8181

82-
Ok((Default::default(), Some(who.clone()), origin))
82+
Ok((Default::default(), (), origin))
8383
}
8484
}

runtime/tests/sudo_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn sudo_extrinsic(inner: RuntimeCall) -> RuntimeCall {
4141
fn validate_ext(
4242
origin: RuntimeOrigin,
4343
call: &RuntimeCall,
44-
) -> ValidateResult<Option<AccountId>, RuntimeCall> {
44+
) -> ValidateResult<(), RuntimeCall> {
4545
let ext = sudo_wrapper::SudoTransactionExtension::<Runtime>::new();
4646

4747
ext.validate(

0 commit comments

Comments
 (0)