Skip to content

Commit

Permalink
Merge pull request #1256 from privacy-scaling-explorations/fix/state-…
Browse files Browse the repository at this point in the history
…index

fix(cli): read state index from event args
  • Loading branch information
0xmad authored Feb 27, 2024
2 parents 8b9a018 + 7d7991b commit 99f7770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/ts/commands/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));

Expand Down

0 comments on commit 99f7770

Please sign in to comment.