From 8d8bff5fa68a0b9639ef971a656b6c5ddb76e0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Robles?= Date: Thu, 5 Sep 2024 14:38:46 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Login=20error=20for=20voters=20(?= =?UTF-8?q?#465)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parent issue: https://github.com/sequentech/meta/issues/1832 --- avBooth/booth-directive/booth-directive.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/avBooth/booth-directive/booth-directive.js b/avBooth/booth-directive/booth-directive.js index 832b5e11..f50760ad 100644 --- a/avBooth/booth-directive/booth-directive.js +++ b/avBooth/booth-directive/booth-directive.js @@ -696,6 +696,7 @@ angular.module('avBooth') return scope.state !== stateEnum.errorScreen && scope.state !== stateEnum.successScreen; } var demoStartTime = Date.now(); + scope.startTimeMs = demoStartTime; // Try to read and process voting credentials function readVoteCredentials() { @@ -733,10 +734,7 @@ angular.module('avBooth') currentElectionCredentials = _.find( scope.credentials, function (electionCredential) { - return ( - electionCredential.electionId.toString() === scope.electionId || - (electionCredential.electionId - 1).toString() === scope.electionId - ); + return electionCredential.electionId.toString() === scope.electionId && !!electionCredential.token; } ); } catch (error) {