Skip to content

Commit

Permalink
Move subscribe and encryptAndSend back to private (trustwallet#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoneparise authored Dec 5, 2019
1 parent af75c15 commit 4fdf2c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ open class WCClient (
}
}

open fun subscribe(topic: String): Boolean {
private fun subscribe(topic: String): Boolean {
val message = WCSocketMessage(
topic = topic,
type = MessageType.SUB,
Expand All @@ -318,7 +318,7 @@ open class WCClient (
return socket?.send(gson.toJson(message)) ?: false
}

open fun encryptAndSend(result: String): Boolean {
private fun encryptAndSend(result: String): Boolean {
Log.d(TAG,"==> message $result")
val session = this.session ?: throw IllegalStateException("session can't be null on message send")
val payload = gson.toJson(encrypt(result.toByteArray(Charsets.UTF_8), session.key.hexStringToByteArray()))
Expand Down

0 comments on commit 4fdf2c1

Please sign in to comment.