From f2957e42e0988e4c2c93121e89d28dde495dfc2b Mon Sep 17 00:00:00 2001 From: Vadim Arasev Date: Tue, 19 Jun 2018 12:56:54 +0300 Subject: [PATCH] (Fix) Optimized ballot card --- src/components/BallotCard.jsx | 3 ++- src/components/BallotKeysCard.jsx | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/BallotCard.jsx b/src/components/BallotCard.jsx index 8f93167..9df1ac4 100644 --- a/src/components/BallotCard.jsx +++ b/src/components/BallotCard.jsx @@ -52,7 +52,8 @@ export class BallotCard extends React.Component { } const { contractsStore, votingType } = this.props; let description = 'Finalization is available after ballot time is finished'; - if (this.getContract(contractsStore, votingType).doesMethodExist('canBeFinalizedNow')) { + //if (this.getContract(contractsStore, votingType).doesMethodExist('canBeFinalizedNow')) { + if (this.canBeFinalized !== null) { description += ' or all validators are voted'; } return description; diff --git a/src/components/BallotKeysCard.jsx b/src/components/BallotKeysCard.jsx index a6ba84f..0affdcc 100644 --- a/src/components/BallotKeysCard.jsx +++ b/src/components/BallotKeysCard.jsx @@ -60,12 +60,18 @@ export class BallotKeysCard extends React.Component { if (votingState.hasOwnProperty('newVotingKey')) { this.newVotingKey = votingState.newVotingKey; + if (this.newVotingKey === "0x0000000000000000000000000000000000000000") { + this.newVotingKey = ""; + } } else { this.getNewVotingKey(); } if (votingState.hasOwnProperty('newPayoutKey')) { this.newPayoutKey = votingState.newPayoutKey; + if (this.newPayoutKey === "0x0000000000000000000000000000000000000000") { + this.newPayoutKey = ""; + } } else { this.getNewPayoutKey(); }