diff --git a/opstack/src/builder.rs b/opstack/src/builder.rs index b686649a..4f218bdb 100644 --- a/opstack/src/builder.rs +++ b/opstack/src/builder.rs @@ -30,14 +30,14 @@ impl OpStackClientBuilder { self } - pub fn consensus_rpc(mut self, consensus_rpc: T) -> Self { - self.consensus_rpc = Some(consensus_rpc.into_url().unwrap()); - self + pub fn consensus_rpc(mut self, consensus_rpc: T) -> Result { + self.consensus_rpc = Some(consensus_rpc.into_url()?); + Ok(self) } - pub fn execution_rpc(mut self, execution_rpc: T) -> Self { - self.execution_rpc = Some(execution_rpc.into_url().unwrap()); - self + pub fn execution_rpc(mut self, execution_rpc: T) -> Result { + self.execution_rpc = Some(execution_rpc.into_url()?); + Ok(self) } pub fn rpc_socket(mut self, socket: SocketAddr) -> Self {