(Fix) Avoid some exceptions if Metamask is locked

This commit is contained in:
Vadim Arasev 2018-07-11 11:19:13 +03:00
parent 005f852ec3
commit 44aacbddac
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export class BallotKeysMetadata extends React.Component {
}
}
let newVotingPayoutKeys = '';
if (ballotStore.isNewValidatorPersonalData && contractsStore.votingToChangeKeys.doesMethodExist('createBallotToAddNewValidator')) {
if (ballotStore.isNewValidatorPersonalData && contractsStore.votingToChangeKeys && contractsStore.votingToChangeKeys.doesMethodExist('createBallotToAddNewValidator')) {
newVotingPayoutKeys = <div>
<div className="left">
<div className="form-el">

View File

@ -18,7 +18,7 @@ export class BallotProxyMetadata extends React.Component {
/*7*/ { value: '8', label: ballotStore.ProxyBallotType[8] }, // ProxyStorage
];
if (!contractsStore.proxyStorage.doesMethodExist('getValidatorMetadata')) {
if (!contractsStore.proxyStorage || !contractsStore.proxyStorage.doesMethodExist('getValidatorMetadata')) {
options.splice(6); // keep 0-5 and remove 6-... items if ProxyStorage is old
}