From 67bf5bb83c24e506525d7ed8c6b8292d1ccf4c57 Mon Sep 17 00:00:00 2001 From: Bob Ong Date: Tue, 25 Jun 2024 17:27:36 +0800 Subject: [PATCH] [dag block] add dag field for block detail page --- public/locales/en/translation.json | 6 +++++- public/locales/zh/translation.json | 6 +++++- src/modules/Blocks/components/Detail/index.tsx | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 36ad369..91223bc 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -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": { diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 5605275..d6db4db 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -44,10 +44,14 @@ "Height": "高度", "Author": "创建者", "Difficulty": "难度", - "ParentHash": "父块哈希", + "ParentHash": "主链父块哈希", "Transactions": "交易量", "GasUsed": "Gas消耗量", "Uncles": "叔块", + "ParentsHash": "父块哈希集合", + "DaaScore": "难度调整算法分数", + "HeightgroupIndex": "高度组索引", + "MergedBlueset": "蓝块集", "": "" }, "uncleblock": { diff --git a/src/modules/Blocks/components/Detail/index.tsx b/src/modules/Blocks/components/Detail/index.tsx index 7505daa..cb963e0 100644 --- a/src/modules/Blocks/components/Detail/index.tsx +++ b/src/modules/Blocks/components/Detail/index.tsx @@ -261,7 +261,20 @@ class Index extends PureComponent { [t('common.GasUsed'), formatNumber(header.gas_used)], [t('block.ParentHash'), ], + title={header.parent_hash} /> + ], + [t('block.ParentsHash'), + header.parents_hash.map((hash: string) => ( + + )) + ], + [t('block.DaaScore'),formatNumber(block.daa_score)], + [t('block.HeightgroupIndex'),formatNumber(block.heightgroup_index)], + [t('block.MergedBlueset'), + block.merged_blueset.map((hash: string) => ( + + )) + ], ]; return (