Skip to content

Commit

Permalink
refactor(chain-ops): Reuse new constructor method for `ProtocolWatc…
Browse files Browse the repository at this point in the history
…her`.
  • Loading branch information
KirilMihaylov committed Sep 26, 2024
1 parent 136ce70 commit 1bb752a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chain-ops/src/task/protocol_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ impl super::ProtocolWatcher for ProtocolWatcher {
where
ApplicationDefined: application_defined::Id,
{
Self {
admin_contract: service_configuration.admin_contract().clone(),
protocol_tasks: task_states
Self::new(
service_configuration.admin_contract().clone(),
task_states
.keys()
.filter_map(|id| {
if let task::Id::ApplicationDefined(id) = id {
Expand All @@ -106,7 +106,7 @@ impl super::ProtocolWatcher for ProtocolWatcher {
})
.collect(),
command_tx,
}
)
}
}

Expand Down

0 comments on commit 1bb752a

Please sign in to comment.