From 1f900c641a93209ce9f762e0f462ad437106b2db Mon Sep 17 00:00:00 2001 From: Roman Storm Date: Sat, 6 Jan 2018 14:45:16 -0800 Subject: [PATCH 1/2] (BugFix) pass correct miningKey value --- src/components/NewBallot.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/NewBallot.jsx b/src/components/NewBallot.jsx index 82a804a..e140705 100644 --- a/src/components/NewBallot.jsx +++ b/src/components/NewBallot.jsx @@ -19,6 +19,7 @@ export class NewBallot extends React.Component { checkValidation() { const { commonStore, contractsStore, ballotStore, validatorStore } = this.props; + console.log(ballotStore.endTime) const isAfter = moment(ballotStore.endTime).isAfter(moment()); if (ballotStore.isNewValidatorPersonalData) { @@ -53,8 +54,9 @@ export class NewBallot extends React.Component { commonStore.hideLoading(); 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) { swal("Warning!", constants.MINING_KEY_IS_NOT_ADDRESS_MSG, "warning"); commonStore.hideLoading(); @@ -100,7 +102,7 @@ export class NewBallot extends React.Component { ballotStore.endTimeUnix, ballotStore.ballotKeys.affectedKey, ballotStore.ballotKeys.keyType, - ballotStore.ballotKeys.miningKey, + ballotStore.ballotKeys.miningKey.value, ballotStore.ballotKeys.keysBallotType, contractsStore.votingKey ]; From 12961b272dd559bf1003f66716e27379bfb31cc0 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 3 Jan 2018 21:03:13 +0300 Subject: [PATCH 2/2] Keys ballot type to transaction: add/remove/swap fix --- src/components/NewBallot.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/NewBallot.jsx b/src/components/NewBallot.jsx index e140705..7bb2ba0 100644 --- a/src/components/NewBallot.jsx +++ b/src/components/NewBallot.jsx @@ -19,7 +19,6 @@ export class NewBallot extends React.Component { checkValidation() { const { commonStore, contractsStore, ballotStore, validatorStore } = this.props; - console.log(ballotStore.endTime) const isAfter = moment(ballotStore.endTime).isAfter(moment()); if (ballotStore.isNewValidatorPersonalData) { @@ -56,7 +55,6 @@ export class NewBallot extends React.Component { } let isMiningKeyAddress = contractsStore.web3Instance.isAddress(ballotStore.ballotKeys.miningKey.value); - console.log(isMiningKeyAddress, 'pizda', ballotStore.ballotKeys.miningKey) if (!isMiningKeyAddress) { swal("Warning!", constants.MINING_KEY_IS_NOT_ADDRESS_MSG, "warning"); commonStore.hideLoading();