Skip to content

Commit

Permalink
feat(bindings): generate a random private key (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos authored Feb 20, 2024
1 parent 501c92e commit 56ff30c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/waku_thread/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ proc parsePrivateKey(jsonNode: JsonNode,
jsonResp: var JsonEvent): bool =

if not jsonNode.contains("key"):
jsonResp = JsonErrorEvent.new("The node key is missing.");
return false
privateKey = PrivateKey.random(Secp256k1, newRng()[]).tryGet()
return true

if jsonNode["key"].kind != JsonNodeKind.JString:
jsonResp = JsonErrorEvent.new("The node key should be a string.");
Expand Down

0 comments on commit 56ff30c

Please sign in to comment.