Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
apply review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Nov 8, 2022
1 parent d53835b commit 84ec23a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions primitives/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ where
T::Api: SessionKeys<Block>,
{
if !seeds.is_empty() {
let runtime_api = client.runtime_api();
return Ok(())
}

let runtime_api = client.runtime_api();

for seed in seeds {
runtime_api.generate_session_keys(at, Some(seed.as_bytes().to_vec()))?;
}
for seed in seeds {
runtime_api.generate_session_keys(at, Some(seed.as_bytes().to_vec()))?;
}

Ok(())
Expand Down

0 comments on commit 84ec23a

Please sign in to comment.