(Fix) index.js and BallotCard.jsx

This commit is contained in:
Vadim Arasev 2018-09-19 13:26:04 +03:00
parent f738081157
commit 8c70c917d2
2 changed files with 7 additions and 5 deletions

View File

@ -361,7 +361,7 @@ export class BallotCard extends React.Component {
if (!this.timeToCancel.val) {
canCancel = false
}
if (votingState.creator.toLowerCase() !== contractsStore.miningKey.toLowerCase()) {
if (votingState.creatorMiningKey.toLowerCase() !== contractsStore.miningKey.toLowerCase()) {
canCancel = false
}
commonStore.showLoading()
@ -520,7 +520,7 @@ export class BallotCard extends React.Component {
if (
votingState.hasOwnProperty('creationTime') &&
contractsStore.ballotCancelingThreshold > 0 &&
votingState.creator === contractsStore.miningKey
votingState.creatorMiningKey === contractsStore.miningKey
) {
this.cancelDeadline = moment
.utc((votingState.creationTime + contractsStore.ballotCancelingThreshold) * 1000)

View File

@ -71,15 +71,17 @@ class AppMainRouter extends Component {
await contractsStore.setMiningKey(web3Config)
await contractsStore.setVotingKey(web3Config)
await contractsStore.getAllValidatorMetadata()
await contractsStore.getAllBallots()
contractsStore.getKeysBallotThreshold()
contractsStore.getProxyBallotThreshold()
contractsStore.getBallotCancelingThreshold()
contractsStore.getBallotsLimits()
await contractsStore.getAllValidatorMetadata()
await contractsStore.getAllBallots()
console.log('votingKey', contractsStore.votingKey)
console.log('miningKey', contractsStore.miningKey)
commonStore.hideLoading()
})
.catch(error => {