diff --git a/src/Simplex/Messaging/Agent/Protocol.hs b/src/Simplex/Messaging/Agent/Protocol.hs index ebd118a6b..9b96ce573 100644 --- a/src/Simplex/Messaging/Agent/Protocol.hs +++ b/src/Simplex/Messaging/Agent/Protocol.hs @@ -360,6 +360,13 @@ instance StrEncoding SwitchPhase where "completed" -> pure SPCompleted _ -> fail "bad SwitchPhase" +instance ToJSON SwitchPhase where + toEncoding = strToJEncoding + toJSON = strToJSON + +instance FromJSON SwitchPhase where + parseJSON = strParseJSON "SwitchPhase" + data ConnectionStats = ConnectionStats { rcvServers :: [SMPServer], sndServers :: [SMPServer]