diff --git a/side-node/src/websocket.rs b/side-node/src/websocket.rs index 67a3f89..eecafe0 100644 --- a/side-node/src/websocket.rs +++ b/side-node/src/websocket.rs @@ -32,6 +32,9 @@ impl WebSocketClient { #[async_trait] impl ezsockets::ClientExt for WebSocketClient { + // Right now we're only using the Call type for sending signed ops + // change this to an enum if we need to send other types of calls, and + // match on it. type Call = String; async fn on_text(&mut self, text: String) -> Result<(), ezsockets::Error> { @@ -47,9 +50,8 @@ impl ezsockets::ClientExt for WebSocketClient { } async fn on_call(&mut self, call: Self::Call) -> Result<(), ezsockets::Error> { - let to_send = serde_json::to_string(&call).unwrap(); - tracing::info!("sending signed op: {to_send:?}"); - self.handle.text(to_send)?; + tracing::info!("sending signed op: {call:?}"); + self.handle.text(call)?; Ok(()) } }