Skip to content

Commit

Permalink
Fix PoW solutions view
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Dmitriev committed Dec 14, 2018
1 parent 878c925 commit d0d877c
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions client/src/components/block/block-info/block-info.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ export class BlockInfoComponent extends React.Component<IBlockInfoProps> {
{ this.props.block.header.id }
</div>
</div>


{ this.props.block.header.height !== 0 &&
<div className='bi-block-info__row bi-table__row'>
<div className='bi-block-info__cell bi-block-info__cell--header bi-table__cell'>
<FormattedMessage id='common.block.parent'/>
</div>

<div className='bi-block-info__cell bi-table__cell u-word-wrap'>
<Link to={ `/blocks/${this.props.block.header.parentId}` }>
{ this.props.block.header.parentId }
</Link>
</div>
</div>
}

<div className='bi-block-info__row bi-table__row'>
<div className='bi-block-info__cell bi-block-info__cell--header bi-table__cell'>
<FormattedMessage id='common.block.difficulty'/>
</div>

<div className='bi-block-info__cell bi-table__cell u-word-wrap'>
{ this.props.block.header.difficulty }
</div>
Expand All @@ -93,14 +93,14 @@ export class BlockInfoComponent extends React.Component<IBlockInfoProps> {
{ this.props.block.header.version }
</div>
</div>


{ this.props.block.header.height !== 0 &&
<div className='bi-block-info__row bi-table__row'>
<div className='bi-block-info__cell bi-block-info__cell--header bi-table__cell'>
<FormattedMessage id='common.block.interlinks'/>
</div>

<div className='bi-block-info__cell bi-table__cell'>
{
this.props.block.header.interlinks.map((interlink: string, index: number) => {
Expand Down Expand Up @@ -163,7 +163,14 @@ export class BlockInfoComponent extends React.Component<IBlockInfoProps> {
</div>

<div className='bi-block-info__cell u-word-wrap'>
{ this.props.block.header.powSolutions }
{ Object.keys(this.props.block.header.powSolutions)
.map((key) => {
return (
<div key={ key }>
{ key }: { this.props.block.header.powSolutions[key] }
</div>
);
}) }
</div>
</div>

Expand Down

0 comments on commit d0d877c

Please sign in to comment.