Formatting and simplification

This commit is contained in:
stubbsta 2026-01-12 11:24:59 +02:00
parent cd77e30fb7
commit c725e3640f
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View File

@ -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",

View File

@ -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()