chore: make (emoji/color)Hash direct status_go call

This commit is contained in:
Patryk Osmaczko 2022-03-17 20:59:10 +01:00 committed by osmaczko
parent 4b48bc69bd
commit 9e0b8c5e90
3 changed files with 9 additions and 12 deletions

View File

@ -1,15 +1,12 @@
import json, chronicles, core
import json, json_serialization
import response_type
import status_go
export response_type
logScope:
topics = "rpc-visual-identity"
proc emojiHashOf*(pubkey: string): RpcResponse[JsonNode] {.raises: [Exception].} =
result = Json.decode(status_go.emojiHash(pubkey), RpcResponse[JsonNode])
proc emojiHashOf*(key: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [key]
result = core.callPrivateRPC("visualIdentity_emojiHashOf", payload)
proc colorHashOf*(key: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [key]
result = core.callPrivateRPC("visualIdentity_colorHashOf", payload)
proc colorHashOf*(pubkey: string): RpcResponse[JsonNode] {.raises: [Exception].} =
result = Json.decode(status_go.colorHash(pubkey), RpcResponse[JsonNode])

@ -1 +1 @@
Subproject commit 42ec1de85d4b3b53979b56d811d2519a94b6a96a
Subproject commit ed2b3f656732e8670a21150559705933fdc8342a

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 7ef8bc68c806d8b62dbda303e2f7819030be29a5
Subproject commit d0f4a94f7502ce37adf1f08065b07262b682c4bf