Skip to content

Commit

Permalink
Reverting abstraction of writing..
Browse files Browse the repository at this point in the history
..persiting credential
  • Loading branch information
kgrgpg committed Aug 1, 2022
1 parent 135b72a commit 08ab7a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,6 @@ proc mountRlnRelayStatic*(node: WakuNode,

node.wakuRlnRelay = rlnPeer

proc writePersistentRlnCredentials*(path: string, credentials: RlnMembershipCredentials) {.raises: [Defect, OSError, IOError, Exception].} =
# Write RLN credentials
writeFile(RLN_CREDENTIALS_FILEPATH, pretty(%credentials))

proc mountRlnRelayDynamic*(node: WakuNode,
ethClientAddr: string = "",
Expand Down Expand Up @@ -802,7 +799,8 @@ proc mountRlnRelayDynamic*(node: WakuNode,
# Since the files are stored as a raw text file, it is highly susceptible to theft.
# The files needs some encryption to resolve this.

writePersistentRlnCredentials(RLN_CREDENTIALS_FILEPATH, rlnMembershipCredentials)
# Write RLN credentials
writeFile(RLN_CREDENTIALS_FILEPATH, pretty(%rlnMembershipCredentials))

# create the WakuRLNRelay
var rlnPeer = WakuRLNRelay(membershipKeyPair: keyPair,
Expand Down

0 comments on commit 08ab7a1

Please sign in to comment.