Skip to content

Browser and Node.js encryption/decryption algorithms differ #1472

@nicholaspai

Description

@nicholaspai

This causes problems if user attempts to commit via the CLI and reveal or recommit via the dApp for example.

After committing via the CLI, I ran into this error on the dApp when attempting to query EncryptedVotes:

Screen Shot 2020-05-18 at 16 24 46

FYI: If user wants to re-commit via the dApp after comitting via the CLI, it suffices to block the dApp from querying old encrypted votes. You can change the fromBlock prop to the latest block in this line in voter-dapp/src/ActiveRequests.js:

const encryptedVoteEvents = useCacheEvents(
    "Voting",
    "EncryptedVote",
    useMemo(() => ({ filter: { voter: votingAccount, roundId: currentRoundId }, fromBlock: 0 }), [
      votingAccount,
      currentRoundId
    ])
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions