Commit d7913157 authored by tom's avatar tom

hide L1 status and Batch fields from tx and block details

parent 3dd86083
...@@ -200,6 +200,8 @@ Settings for meta tags, OG tags and SEO ...@@ -200,6 +200,8 @@ Settings for meta tags, OG tags and SEO
| `total_reward` | Total block reward | | `total_reward` | Total block reward |
| `nonce` | Block nonce | | `nonce` | Block nonce |
| `miner` | Address of block's miner or validator | | `miner` | Address of block's miner or validator |
| `L1_status` | Short interpretation of the batch lifecycle (applicable for Rollup chains) |
| `batch` | Batch index (applicable for Rollup chains) |
   
...@@ -234,6 +236,8 @@ Settings for meta tags, OG tags and SEO ...@@ -234,6 +236,8 @@ Settings for meta tags, OG tags and SEO
| `tx_fee` | Total transaction fee | | `tx_fee` | Total transaction fee |
| `gas_fees` | Gas fees breakdown | | `gas_fees` | Gas fees breakdown |
| `burnt_fees` | Amount of native coin burnt for transaction | | `burnt_fees` | Amount of native coin burnt for transaction |
| `L1_status` | Short interpretation of the batch lifecycle (applicable for Rollup chains) |
| `batch` | Batch index (applicable for Rollup chains) |
##### Transaction additional fields list ##### Transaction additional fields list
| Id | Description | | Id | Description |
......
...@@ -5,6 +5,8 @@ export const BLOCK_FIELDS_IDS = [ ...@@ -5,6 +5,8 @@ export const BLOCK_FIELDS_IDS = [
'total_reward', 'total_reward',
'nonce', 'nonce',
'miner', 'miner',
'L1_status',
'batch',
] as const; ] as const;
export type BlockFieldId = ArrayElement<typeof BLOCK_FIELDS_IDS>; export type BlockFieldId = ArrayElement<typeof BLOCK_FIELDS_IDS>;
...@@ -7,6 +7,8 @@ export const TX_FIELDS_IDS = [ ...@@ -7,6 +7,8 @@ export const TX_FIELDS_IDS = [
'tx_fee', 'tx_fee',
'gas_fees', 'gas_fees',
'burnt_fees', 'burnt_fees',
'L1_status',
'batch',
] as const; ] as const;
export type TxFieldsId = ArrayElement<typeof TX_FIELDS_IDS>; export type TxFieldsId = ArrayElement<typeof TX_FIELDS_IDS>;
......
...@@ -220,8 +220,7 @@ const BlockDetails = ({ query }: Props) => { ...@@ -220,8 +220,7 @@ const BlockDetails = ({ query }: Props) => {
</DetailsInfoItem> </DetailsInfoItem>
) } ) }
{ rollupFeature.isEnabled && rollupFeature.type === 'zkSync' && data.zksync && ( { rollupFeature.isEnabled && rollupFeature.type === 'zkSync' && data.zksync && !config.UI.views.block.hiddenFields?.batch && (
<>
<DetailsInfoItem <DetailsInfoItem
title="Batch" title="Batch"
hint="Batch number" hint="Batch number"
...@@ -234,6 +233,8 @@ const BlockDetails = ({ query }: Props) => { ...@@ -234,6 +233,8 @@ const BlockDetails = ({ query }: Props) => {
/> />
) : <Skeleton isLoaded={ !isPlaceholderData }>Pending</Skeleton> } ) : <Skeleton isLoaded={ !isPlaceholderData }>Pending</Skeleton> }
</DetailsInfoItem> </DetailsInfoItem>
) }
{ rollupFeature.isEnabled && rollupFeature.type === 'zkSync' && data.zksync && !config.UI.views.block.hiddenFields?.L1_status && (
<DetailsInfoItem <DetailsInfoItem
title="Status" title="Status"
hint="Status is the short interpretation of the batch lifecycle" hint="Status is the short interpretation of the batch lifecycle"
...@@ -241,7 +242,6 @@ const BlockDetails = ({ query }: Props) => { ...@@ -241,7 +242,6 @@ const BlockDetails = ({ query }: Props) => {
> >
<VerificationSteps steps={ ZKSYNC_L2_TX_BATCH_STATUSES } currentStep={ data.zksync.status } isLoading={ isPlaceholderData }/> <VerificationSteps steps={ ZKSYNC_L2_TX_BATCH_STATUSES } currentStep={ data.zksync.status } isLoading={ isPlaceholderData }/>
</DetailsInfoItem> </DetailsInfoItem>
</>
) } ) }
{ !config.UI.views.block.hiddenFields?.miner && ( { !config.UI.views.block.hiddenFields?.miner && (
......
...@@ -160,7 +160,8 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => { ...@@ -160,7 +160,8 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
</Tag> </Tag>
) } ) }
</DetailsInfoItem> </DetailsInfoItem>
{ rollupFeature.isEnabled && rollupFeature.type === 'optimistic' && data.op_withdrawals && data.op_withdrawals.length > 0 && ( { rollupFeature.isEnabled && rollupFeature.type === 'optimistic' && data.op_withdrawals && data.op_withdrawals.length > 0 &&
!config.UI.views.tx.hiddenFields?.L1_status && (
<DetailsInfoItem <DetailsInfoItem
title="Withdrawal status" title="Withdrawal status"
hint="Detailed status progress of the transaction" hint="Detailed status progress of the transaction"
...@@ -181,7 +182,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => { ...@@ -181,7 +182,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
</Flex> </Flex>
</DetailsInfoItem> </DetailsInfoItem>
) } ) }
{ data.zkevm_status && ( { data.zkevm_status && !config.UI.views.tx.hiddenFields?.L1_status && (
<DetailsInfoItem <DetailsInfoItem
title="Confirmation status" title="Confirmation status"
hint="Status of the transaction confirmation path to L1" hint="Status of the transaction confirmation path to L1"
...@@ -198,7 +199,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => { ...@@ -198,7 +199,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
<TxRevertReason { ...data.revert_reason }/> <TxRevertReason { ...data.revert_reason }/>
</DetailsInfoItem> </DetailsInfoItem>
) } ) }
{ data.zksync && ( { data.zksync && !config.UI.views.tx.hiddenFields?.L1_status && (
<DetailsInfoItem <DetailsInfoItem
title="L1 status" title="L1 status"
hint="Status is the short interpretation of the batch lifecycle" hint="Status is the short interpretation of the batch lifecycle"
...@@ -229,7 +230,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => { ...@@ -229,7 +230,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
</> </>
) } ) }
</DetailsInfoItem> </DetailsInfoItem>
{ data.zkevm_batch_number && ( { data.zkevm_batch_number && !config.UI.views.tx.hiddenFields?.batch && (
<DetailsInfoItem <DetailsInfoItem
title="Tx batch" title="Tx batch"
hint="Batch index for this transaction" hint="Batch index for this transaction"
...@@ -241,7 +242,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => { ...@@ -241,7 +242,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
/> />
</DetailsInfoItem> </DetailsInfoItem>
) } ) }
{ data.zksync && ( { data.zksync && !config.UI.views.tx.hiddenFields?.batch && (
<DetailsInfoItem <DetailsInfoItem
title="Batch" title="Batch"
hint="Batch number" hint="Batch number"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment