Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
feat: inactive validators count
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnygleason committed Jul 31, 2019
1 parent 89f6570 commit e686b0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/v2/components/TourDeSol/Cards/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useStyles from './styles';

const Cards = () => {
const classes = useStyles();
const {cluster, validators, totalStakedTokens} = NodesStore;
const {cluster, validators, inactiveValidators, totalStakedTokens} = NodesStore;

const cards = [
{
Expand Down Expand Up @@ -38,7 +38,7 @@ const Cards = () => {
},
{
title: 'Current Network Inflation Rate',
value: ((cluster.networkInflationRate * 100.0).toFixed(3) + '%') || 'N/A',
value: (cluster.networkInflationRate * 100.0).toFixed(3) + '%',
changes: '',
period: 'since yesterday',
},
Expand All @@ -50,7 +50,7 @@ const Cards = () => {
},
{
title: '# of Inactive Validators',
value: 'TODO',
value: inactiveValidators.length,
changes: '',
period: 'since yesterday',
},
Expand Down
2 changes: 1 addition & 1 deletion src/v2/components/UI/StatCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const StatCard = (props: StatCardProps) => {
const classes = useStyles();
const {title, value, changes} = props;
const renderValue = () => {
if (!value) return;
if (!value && !(value === 0)) return;
if (typeof value === 'function') {
return value();
}
Expand Down

0 comments on commit e686b0e

Please sign in to comment.