From cc20dc0f9ceffb580bf38961be7a0c88f80362f0 Mon Sep 17 00:00:00 2001 From: michaeltomasik Date: Wed, 27 Jun 2018 11:08:36 +0200 Subject: [PATCH] :recycle: Change integer to more descreptive variablein delegate Statistics --- src/components/transactions/delegateStatistics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/transactions/delegateStatistics.js b/src/components/transactions/delegateStatistics.js index cca7624992..f41227f3a3 100644 --- a/src/components/transactions/delegateStatistics.js +++ b/src/components/transactions/delegateStatistics.js @@ -3,6 +3,7 @@ import grid from 'flexboxgrid/dist/flexboxgrid.css'; import { translate } from 'react-i18next'; import UserVotes from './userVotes'; import VotedDelegates from './votedDelegates'; +import voting from '../../constants/voting'; import styles from './delegateStatistics.css'; class DelegateStatistics extends React.Component { @@ -10,8 +11,9 @@ class DelegateStatistics extends React.Component { const { delegate } = this.props; let status = ''; + if (delegate && delegate.rank) { - status = delegate.rank <= 101 ? this.props.t('Active') : this.props.t('Standby'); + status = delegate.rank <= voting.maxCountOfVotes ? this.props.t('Active') : this.props.t('Standby'); } const missed = this.props.t('missed');