From ebac87dfa2e46b78c7e0bf139d1bf8ebe8217e0e Mon Sep 17 00:00:00 2001 From: erhant Date: Thu, 31 Oct 2024 13:39:51 +0300 Subject: [PATCH] added `start` check for registrations --- src/commands/coordinator.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/coordinator.rs b/src/commands/coordinator.rs index 2d2f65d..b9dd2b7 100644 --- a/src/commands/coordinator.rs +++ b/src/commands/coordinator.rs @@ -27,6 +27,10 @@ pub async fn run_oracle( kinds.push(kind); } } + + if kinds.is_empty() { + return Err(eyre!("You are not registered as any type of oracle."))?; + } } else { // otherwise, make sure we are registered to required kinds for kind in &kinds {