Stopped double-encoding the SignedOp
This commit is contained in:
@@ -32,6 +32,9 @@ impl WebSocketClient {
|
|||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl ezsockets::ClientExt for WebSocketClient {
|
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;
|
type Call = String;
|
||||||
|
|
||||||
async fn on_text(&mut self, text: String) -> Result<(), ezsockets::Error> {
|
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> {
|
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: {call:?}");
|
||||||
tracing::info!("sending signed op: {to_send:?}");
|
self.handle.text(call)?;
|
||||||
self.handle.text(to_send)?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user