Skip to content

Commit

Permalink
[dag block] add dag field for block detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
welbon committed Jun 25, 2024
1 parent 2ca80c7 commit 67bf5bb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
6 changes: 5 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
"Height": "Height",
"Author": "Author",
"Difficulty": "Difficulty",
"ParentHash": "Parant Hash",
"ParentHash": "Selected Parant Hash",
"Transactions": "Transactions",
"GasUsed": "Gas Used",
"Uncles": "Uncles",
"ParentsHash": "Parant Hash Set",
"HeightgroupIndex": "Height group Index",
"DaaScore": "Difficulty Adjustment Algorithm Score",
"MergedBlueset": "Merged Blueset",
"": ""
},
"uncleblock": {
Expand Down
6 changes: 5 additions & 1 deletion public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
"Height": "高度",
"Author": "创建者",
"Difficulty": "难度",
"ParentHash": "父块哈希",
"ParentHash": "主链父块哈希",
"Transactions": "交易量",
"GasUsed": "Gas消耗量",
"Uncles": "叔块",
"ParentsHash": "父块哈希集合",
"DaaScore": "难度调整算法分数",
"HeightgroupIndex": "高度组索引",
"MergedBlueset": "蓝块集",
"": ""
},
"uncleblock": {
Expand Down
15 changes: 14 additions & 1 deletion src/modules/Blocks/components/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,20 @@ class Index extends PureComponent<IndexProps, IndexState> {
[t('common.GasUsed'), formatNumber(header.gas_used)],
[t('block.ParentHash'),
<CommonLink key={header.parent_hash} path={`/${network}/blocks/detail/${header.parent_hash}`}
title={header.parent_hash} />],
title={header.parent_hash} />
],
[t('block.ParentsHash'),
header.parents_hash.map((hash: string) => (
<CommonLink key={hash} path={`/${network}/blocks/detail/${hash}`} title={hash} />
))
],
[t('block.DaaScore'),formatNumber(block.daa_score)],
[t('block.HeightgroupIndex'),formatNumber(block.heightgroup_index)],
[t('block.MergedBlueset'),
block.merged_blueset.map((hash: string) => (
<CommonLink key={hash} path={`/${network}/blocks/detail/${hash}`} title={hash} />
))
],
];

return (
Expand Down

0 comments on commit 67bf5bb

Please sign in to comment.