From 7d7991b3f525e9be509987baecb3c99cf24f8c4a Mon Sep 17 00:00:00 2001 From: 0xmad <0xmad@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:18:52 -0600 Subject: [PATCH] fix(cli): read state index from event args --- cli/ts/commands/signup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/ts/commands/signup.ts b/cli/ts/commands/signup.ts index 8f51f728d2..67347ade98 100644 --- a/cli/ts/commands/signup.ts +++ b/cli/ts/commands/signup.ts @@ -103,7 +103,7 @@ export const isRegisteredUser = async ({ const publicKey = PubKey.deserialize(maciPubKey).asContractParam(); const events = await maciContract.queryFilter(maciContract.filters.SignUp(undefined, publicKey.x, publicKey.y)); - const stateIndex = events[0]?.args.toString() as string | undefined; + const stateIndex = events[0]?.args[0].toString() as string | undefined; logGreen(quiet, success(`State index: ${stateIndex?.toString()}, registered: ${stateIndex !== undefined}`));