(Fix) index.js and BallotCard.jsx
This commit is contained in:
parent
f738081157
commit
8c70c917d2
|
@ -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)
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue