mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-03 05:23:10 +00:00
simplify checkInitialized check
This commit is contained in:
parent
83dee18266
commit
cd77e30fb7
@ -149,8 +149,7 @@ proc updateRoots*(g: OnchainGroupManager): Future[bool] {.async.} =
|
||||
return false
|
||||
|
||||
proc trackRootChanges*(g: OnchainGroupManager): Future[Result[void, string]] {.async.} =
|
||||
checkInitialized(g).isOkOr:
|
||||
return err(error)
|
||||
? checkInitialized(g)
|
||||
|
||||
const rpcDelay = 5.seconds
|
||||
|
||||
@ -179,8 +178,7 @@ proc trackRootChanges*(g: OnchainGroupManager): Future[Result[void, string]] {.a
|
||||
method register*(
|
||||
g: OnchainGroupManager, rateCommitment: RateCommitment
|
||||
): Future[Result[void, string]] {.async.} =
|
||||
checkInitialized(g).isOkOr:
|
||||
return err(error)
|
||||
? checkInitialized(g)
|
||||
|
||||
try:
|
||||
let leaf = rateCommitment.toLeaf().get()
|
||||
@ -199,8 +197,7 @@ method register*(
|
||||
identityCredential: IdentityCredential,
|
||||
userMessageLimit: UserMessageLimit,
|
||||
): Future[Result[void, string]] {.async.} =
|
||||
checkInitialized(g).isOkOr:
|
||||
return err(error)
|
||||
? checkInitialized(g)
|
||||
|
||||
let ethRpc = g.ethRpc.get()
|
||||
let wakuRlnContract = g.wakuRlnContract.get()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user