Skip to content

Commit

Permalink
Merge pull request #2349 from subspace/return-correct-error-in-check-…
Browse files Browse the repository at this point in the history
…tx-api

Return `MandatoryValidation` error instead of `BadMandatory` if inherent tx is being validated
  • Loading branch information
ParthDesai authored Dec 18, 2023
2 parents 33ee167 + 3ada7dd commit 1b50855
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion domains/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ impl_runtime_apis! {
let dispatch_info = xt.get_dispatch_info();

if dispatch_info.class == DispatchClass::Mandatory {
return Err(InvalidTransaction::BadMandatory.into());
return Err(InvalidTransaction::MandatoryValidation.into());
}

let encoded_len = uxt.encoded_size();
Expand Down
2 changes: 1 addition & 1 deletion domains/test/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ impl_runtime_apis! {
let dispatch_info = xt.get_dispatch_info();

if dispatch_info.class == DispatchClass::Mandatory {
return Err(InvalidTransaction::BadMandatory.into());
return Err(InvalidTransaction::MandatoryValidation.into());
}

let encoded_len = uxt.encoded_size();
Expand Down

0 comments on commit 1b50855

Please sign in to comment.