Skip to content

Commit

Permalink
nit: clean up some repeated code in check_account_existence (#10429)
Browse files Browse the repository at this point in the history
  • Loading branch information
saketh-are authored Jan 15, 2024
1 parent 5c369d4 commit afdae45
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions runtime/runtime/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,15 +995,8 @@ pub(crate) fn check_account_existence(
| Action::Stake(_)
| Action::AddKey(_)
| Action::DeleteKey(_)
| Action::DeleteAccount(_) => {
if account.is_none() {
return Err(ActionErrorKind::AccountDoesNotExist {
account_id: account_id.clone(),
}
.into());
}
}
Action::Delegate(_) => {
| Action::DeleteAccount(_)
| Action::Delegate(_) => {
if account.is_none() {
return Err(ActionErrorKind::AccountDoesNotExist {
account_id: account_id.clone(),
Expand Down

0 comments on commit afdae45

Please sign in to comment.