Check, if it is valid voting key, contracts addresses for sokol
This commit is contained in:
parent
d084e9dec2
commit
d8491b157f
|
@ -149,6 +149,12 @@ export class NewBallot extends React.Component {
|
|||
onClick = async () => {
|
||||
const { commonStore, contractsStore, ballotStore } = this.props;
|
||||
commonStore.showLoading();
|
||||
const isValidVotingKey = contractsStore.isValidVotingKey;
|
||||
if (!isValidVotingKey) {
|
||||
commonStore.hideLoading();
|
||||
swal("Warning!", "The key is not valid voting Key! Please make sure you have loaded correct voting key in metamask", "warning");
|
||||
return;
|
||||
}
|
||||
const isFormValid = this.checkValidation();
|
||||
if (isFormValid) {
|
||||
let methodToCreateBallot;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
KEYS_MANAGER_ADDRESS: '0xfc90125492e58dbfe80c0bfb6a2a759c4f703ca8',
|
||||
VOTING_TO_CHANGE_KEYS_ADDRESS: '0x49df4ec19243263e5db22da5865b4f482b8323a0',
|
||||
VOTING_TO_CHANGE_MIN_THRESHOLD: '0x8829ebe113535826e8af17ed51f83755f675789a',
|
||||
VOTING_TO_CHANGE_PROXY: '0x6b728399b41a38d4109f7af2213d4cc31ca87812'
|
||||
KEYS_MANAGER_ADDRESS: '0x88a34124bfffa27ef3e052c8dd2908e212643771',
|
||||
VOTING_TO_CHANGE_KEYS_ADDRESS: '0x145a3d3bd5db8a0ad863b4949b6088d133726cdb',
|
||||
VOTING_TO_CHANGE_MIN_THRESHOLD: '0xad623f870298774765bc5e56ebeafac721028867',
|
||||
VOTING_TO_CHANGE_PROXY: '0x6fb85b2030a68a76ab237d2392b09e28e6f03fa9'
|
||||
}
|
|
@ -22,6 +22,11 @@ class ContractsStore {
|
|||
this.miningKey = null;
|
||||
}
|
||||
|
||||
@computed get isValidVotingKey() {
|
||||
if (this.miningKey != "0x0000000000000000000000000000000000000000") return true;
|
||||
return false
|
||||
}
|
||||
|
||||
@action("Set web3Instance")
|
||||
setWeb3Instance = (web3Config) => {
|
||||
this.web3Instance = web3Config.web3Instance;
|
||||
|
|
Loading…
Reference in New Issue