(Fix) Optimized ballot card
This commit is contained in:
parent
61dc67ce2b
commit
f2957e42e0
|
@ -52,7 +52,8 @@ export class BallotCard extends React.Component {
|
||||||
}
|
}
|
||||||
const { contractsStore, votingType } = this.props;
|
const { contractsStore, votingType } = this.props;
|
||||||
let description = 'Finalization is available after ballot time is finished';
|
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';
|
description += ' or all validators are voted';
|
||||||
}
|
}
|
||||||
return description;
|
return description;
|
||||||
|
|
|
@ -60,12 +60,18 @@ export class BallotKeysCard extends React.Component {
|
||||||
|
|
||||||
if (votingState.hasOwnProperty('newVotingKey')) {
|
if (votingState.hasOwnProperty('newVotingKey')) {
|
||||||
this.newVotingKey = votingState.newVotingKey;
|
this.newVotingKey = votingState.newVotingKey;
|
||||||
|
if (this.newVotingKey === "0x0000000000000000000000000000000000000000") {
|
||||||
|
this.newVotingKey = "";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getNewVotingKey();
|
this.getNewVotingKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (votingState.hasOwnProperty('newPayoutKey')) {
|
if (votingState.hasOwnProperty('newPayoutKey')) {
|
||||||
this.newPayoutKey = votingState.newPayoutKey;
|
this.newPayoutKey = votingState.newPayoutKey;
|
||||||
|
if (this.newPayoutKey === "0x0000000000000000000000000000000000000000") {
|
||||||
|
this.newPayoutKey = "";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getNewPayoutKey();
|
this.getNewPayoutKey();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue