Concordium / concordium-governance-committee-voting

This repository holds the components required to facilitate elections for the Concordium governance committee
Apache License 2.0
3 stars 8 forks source link

[election dApp] doesn't show anything in case Guardians setup phase has failed - user can try to cast a vote #97

Closed mh-concordium closed 7 months ago

mh-concordium commented 7 months ago

In case user tries to cast a vote while Guardians setup was incomplete, dapp confirm button looks like it keeps loading but it never completes.

To reproduce:

  1. Setup election but don't complete Guardian setup.
  2. After the voting has started cast a vote.

Actual result:

Everything looks fine until use tries to vote. Then, confirmation dialogue keeps loading but it doesn't complete within some minutes. Console log:

worker-weS67Rxg.js:1 Uncaught Error: Could not compute joint election public key: Guardian(s) Map { iter: Enumerate { iter: Iter([1, 2]), count: 0 } } are not represented in the guardian public keys
at q (worker-weS67Rxg.js:1:2622)
at electionguard_bindings_bg-mtr79lDX.wasm:0x1c980
at electionguard_bindings_bg-mtr79lDX.wasm:0x2da1e
at R (worker-weS67Rxg.js:1:2219)
at onmessage (worker-weS67Rxg.js:1:5815)
index-Tw2OsIMx.js:545 Uncaught (in promise) Uncaught Error: Could not compute joint election public key: Guardian(s) Map { iter: Enumerate { iter: Iter([1, 2]), count: 0 } } are not represented in the guardian public keys

Expected result:

User would be informed or prevented earlier in the process that election setup has failed.

soerenbf commented 7 months ago

Will change the status text under the election title to "Voting window to be determined", as the result of an incomplete setup phase is to reset the entire election, at which point the user (i.e. voter) will have to wait for the voting dapp to be redeployed with a new election contract target.