From 03286a64df1018d0e093a77adec25e9b67da3638 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Fri, 23 Feb 2018 18:55:20 +0100 Subject: [PATCH] Events now serialize properly over websockets --- rpc/client/httpclient.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/client/httpclient.go b/rpc/client/httpclient.go index bc6cf759eb9..03f01060df5 100644 --- a/rpc/client/httpclient.go +++ b/rpc/client/httpclient.go @@ -2,7 +2,6 @@ package client import ( "context" - "encoding/json" "sync" "github.com/pkg/errors" @@ -10,6 +9,7 @@ import ( ctypes "github.com/tendermint/tendermint/rpc/core/types" rpcclient "github.com/tendermint/tendermint/rpc/lib/client" "github.com/tendermint/tendermint/types" + "github.com/tendermint/tendermint/wire" cmn "github.com/tendermint/tmlibs/common" tmpubsub "github.com/tendermint/tmlibs/pubsub" ) @@ -326,7 +326,7 @@ func (w *WSEvents) eventListener() { continue } result := new(ctypes.ResultEvent) - err := json.Unmarshal(resp.Result, result) + err := wire.UnmarshalJSON(resp.Result, result) if err != nil { w.Logger.Error("failed to unmarshal response", "err", err) continue