(BugFix) pass correct miningKey value

This commit is contained in:
Roman Storm 2018-01-06 14:45:16 -08:00
parent 754c7ae9ee
commit 1f900c641a
1 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,7 @@ export class NewBallot extends React.Component {
checkValidation() { checkValidation() {
const { commonStore, contractsStore, ballotStore, validatorStore } = this.props; const { commonStore, contractsStore, ballotStore, validatorStore } = this.props;
console.log(ballotStore.endTime)
const isAfter = moment(ballotStore.endTime).isAfter(moment()); const isAfter = moment(ballotStore.endTime).isAfter(moment());
if (ballotStore.isNewValidatorPersonalData) { if (ballotStore.isNewValidatorPersonalData) {
@ -53,8 +54,9 @@ export class NewBallot extends React.Component {
commonStore.hideLoading(); commonStore.hideLoading();
return false; return false;
} }
let isMiningKeyAddress = contractsStore.web3Instance.isAddress(ballotStore.ballotKeys.miningKey);
let isMiningKeyAddress = contractsStore.web3Instance.isAddress(ballotStore.ballotKeys.miningKey.value);
console.log(isMiningKeyAddress, 'pizda', ballotStore.ballotKeys.miningKey)
if (!isMiningKeyAddress) { if (!isMiningKeyAddress) {
swal("Warning!", constants.MINING_KEY_IS_NOT_ADDRESS_MSG, "warning"); swal("Warning!", constants.MINING_KEY_IS_NOT_ADDRESS_MSG, "warning");
commonStore.hideLoading(); commonStore.hideLoading();
@ -100,7 +102,7 @@ export class NewBallot extends React.Component {
ballotStore.endTimeUnix, ballotStore.endTimeUnix,
ballotStore.ballotKeys.affectedKey, ballotStore.ballotKeys.affectedKey,
ballotStore.ballotKeys.keyType, ballotStore.ballotKeys.keyType,
ballotStore.ballotKeys.miningKey, ballotStore.ballotKeys.miningKey.value,
ballotStore.ballotKeys.keysBallotType, ballotStore.ballotKeys.keysBallotType,
contractsStore.votingKey contractsStore.votingKey
]; ];