mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-02 13:03:09 +00:00
Formatting and simplification
This commit is contained in:
parent
cd77e30fb7
commit
c725e3640f
@ -73,10 +73,8 @@ proc doRlnKeystoreGenerator*(conf: RlnKeystoreGeneratorConf) =
|
||||
|
||||
# 4. register on-chain
|
||||
try:
|
||||
let registerResult =
|
||||
waitFor groupManager.register(credential, conf.userMessageLimit)
|
||||
if registerResult.isErr():
|
||||
error "Failed to register on-chain", error = registerResult.error
|
||||
(waitFor groupManager.register(credential, conf.userMessageLimit)).isOkOr:
|
||||
error "Failed to register on-chain", error = error
|
||||
quit(QuitFailure)
|
||||
except Exception, CatchableError:
|
||||
error "failure while registering credentials on-chain",
|
||||
|
||||
@ -149,7 +149,7 @@ proc updateRoots*(g: OnchainGroupManager): Future[bool] {.async.} =
|
||||
return false
|
||||
|
||||
proc trackRootChanges*(g: OnchainGroupManager): Future[Result[void, string]] {.async.} =
|
||||
? checkInitialized(g)
|
||||
?checkInitialized(g)
|
||||
|
||||
const rpcDelay = 5.seconds
|
||||
|
||||
@ -178,7 +178,7 @@ proc trackRootChanges*(g: OnchainGroupManager): Future[Result[void, string]] {.a
|
||||
method register*(
|
||||
g: OnchainGroupManager, rateCommitment: RateCommitment
|
||||
): Future[Result[void, string]] {.async.} =
|
||||
? checkInitialized(g)
|
||||
?checkInitialized(g)
|
||||
|
||||
try:
|
||||
let leaf = rateCommitment.toLeaf().get()
|
||||
@ -197,7 +197,7 @@ method register*(
|
||||
identityCredential: IdentityCredential,
|
||||
userMessageLimit: UserMessageLimit,
|
||||
): Future[Result[void, string]] {.async.} =
|
||||
? checkInitialized(g)
|
||||
?checkInitialized(g)
|
||||
|
||||
let ethRpc = g.ethRpc.get()
|
||||
let wakuRlnContract = g.wakuRlnContract.get()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user