From f9afc30eb7f3f2b8057dfb5fbcace31efd3e6c2c Mon Sep 17 00:00:00 2001 From: Bob Ong Date: Wed, 26 Jun 2024 15:26:27 +0800 Subject: [PATCH] [dag block] Added conditional judgment for different networks --- .../Blocks/components/Detail/index.tsx | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/src/modules/Blocks/components/Detail/index.tsx b/src/modules/Blocks/components/Detail/index.tsx index cb963e0..351421d 100644 --- a/src/modules/Blocks/components/Detail/index.tsx +++ b/src/modules/Blocks/components/Detail/index.tsx @@ -259,24 +259,32 @@ class Index extends PureComponent { ], [t('block.Difficulty'), formatNumber(header.difficulty_number)], [t('common.GasUsed'), formatNumber(header.gas_used)], - [t('block.ParentHash'), - - ], - [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) => ( - - )) - ], ]; + if (network === 'vega' || network === 'halley') { + columns.push( + [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) => ( + + )) + ] + ); + } else { + columns.push( + [t('block.ParentHash'), + + ] + ); + } + return (