Skip to content

Commit

Permalink
make sure validator.commission object exists
Browse files Browse the repository at this point in the history
  • Loading branch information
kwunyeung committed Sep 7, 2019
1 parent 062c9b8 commit 5958f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imports/ui/validators/Validator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ export default class Validator extends Component{
<Col sm={4} className="label"><T>validators.selfDelegationAddress</T></Col>
<Col sm={8} className="value address" data-delegator-address={this.props.validator.delegator_address}><Link to={"/account/"+this.props.validator.delegator_address}>{this.props.validator.delegator_address}</Link></Col>
<Col sm={4} className="label"><T>validators.commissionRate</T></Col>
<Col sm={8} className="value">{this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.rate*100).format('0.00')+"%":''} <small className="text-secondary">({this.state.updateTime})</small></Col>
<Col sm={8} className="value">{this.props.validator.commission&&this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.rate*100).format('0.00')+"%":''} <small className="text-secondary">({this.state.updateTime})</small></Col>
<Col sm={4} className="label"><T>validators.maxRate</T></Col>
<Col sm={8} className="value">{this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.max_rate*100).format('0.00')+"%":''}</Col>
<Col sm={8} className="value">{this.props.validator.commission&&this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.max_rate*100).format('0.00')+"%":''}</Col>
<Col sm={4} className="label"><T>validators.maxChangeRate</T></Col>
<Col sm={8} className="value">{this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.max_change_rate*100).format('0.00')+"%":''}</Col>
<Col sm={8} className="value">{this.props.validator.commission&&this.props.validator.commission.commission_rates?numbro(this.props.validator.commission.commission_rates.max_change_rate*100).format('0.00')+"%":''}</Col>
</Row>
</CardBody>
</Card>
Expand Down

0 comments on commit 5958f36

Please sign in to comment.