From 795472ec5789a53966da58f71bbfa5d03092dd25 Mon Sep 17 00:00:00 2001 From: varasev <33550681+varasev@users.noreply.github.com> Date: Mon, 4 Nov 2019 16:55:41 +0300 Subject: [PATCH] Optimize BallotCard (#211) --- src/components/BallotCard/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/BallotCard/index.js b/src/components/BallotCard/index.js index 6a07070..5a219ac 100644 --- a/src/components/BallotCard/index.js +++ b/src/components/BallotCard/index.js @@ -320,6 +320,10 @@ export class BallotCard extends React.Component { @action('validator has already voted') getHasAlreadyVoted = async () => { const { contractsStore, id, votingType } = this.props + if (contractsStore.miningKey === '0x0000000000000000000000000000000000000000') { + this.hasAlreadyVoted = false + return + } let _hasAlreadyVoted = false try { _hasAlreadyVoted = await this.getContract(contractsStore, votingType).hasAlreadyVoted(