Stopped double-encoding the SignedOp
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user