Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
check chainstatus object before assiging to prop
Browse files Browse the repository at this point in the history
  • Loading branch information
kwunyeung committed May 5, 2020
1 parent 02fd545 commit 3489022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports/ui/validators/Validator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default class Validator extends Component{
<CardBody className="voting-power-card">
{this.state.user?<DelegationButtons validator={this.props.validator}
currentDelegation={this.state.currentUserDelegation}
history={this.props.history} stakingParams={this.props.chainStatus.staking.params}/>:''}
history={this.props.history} stakingParams={this.props.chainStatus.staking?this.props.chainStatus.staking.params:null}/>:''}
<Row>
{this.props.validator.voting_power?<Col xs={12}><h1 className="display-4 voting-power"><Badge color="primary" >{numbro(this.props.validator.voting_power).format('0,0')}</Badge></h1><span>(~{numbro(this.props.validator.voting_power/this.props.chainStatus.activeVotingPower).format('0.00%')})</span></Col>:''}
<Col sm={4} className="label"><T>validators.selfDelegationRatio</T></Col>
Expand Down

0 comments on commit 3489022

Please sign in to comment.