Commit 0ec2e100 authored by tom's avatar tom

hide nonce field in the block views

parent 2df78df4
...@@ -5,6 +5,7 @@ import { getEnvValue, parseEnvJson } from 'configs/app/utils'; ...@@ -5,6 +5,7 @@ import { getEnvValue, parseEnvJson } from 'configs/app/utils';
export const BLOCK_FIELDS_IDS = [ export const BLOCK_FIELDS_IDS = [
'burnt_fees', 'burnt_fees',
'total_reward', 'total_reward',
'nonce',
] as const; ] as const;
export type BlockFieldId = ArrayElement<typeof BLOCK_FIELDS_IDS>; export type BlockFieldId = ArrayElement<typeof BLOCK_FIELDS_IDS>;
......
...@@ -146,6 +146,7 @@ The app version shown in the footer is derived from build-time ENV variables `NE ...@@ -146,6 +146,7 @@ The app version shown in the footer is derived from build-time ENV variables `NE
| --- | --- | | --- | --- |
| `burnt_fees` | Burnt fees | | `burnt_fees` | Burnt fees |
| `total_reward` | Total block reward | | `total_reward` | Total block reward |
| `nonce` | Block nonce |
&nbsp; &nbsp;
......
...@@ -23,7 +23,7 @@ export const featureEnvs = { ...@@ -23,7 +23,7 @@ export const featureEnvs = {
export const viewsEnvs = { export const viewsEnvs = {
block: { block: {
hiddenFields: [ hiddenFields: [
{ name: 'NEXT_PUBLIC_VIEWS_BLOCK_HIDDEN_FIELDS', value: '["burnt_fees", "total_reward"]' }, { name: 'NEXT_PUBLIC_VIEWS_BLOCK_HIDDEN_FIELDS', value: '["burnt_fees", "total_reward", "nonce"]' },
], ],
}, },
}; };
...@@ -469,7 +469,7 @@ const BlockDetails = ({ query }: Props) => { ...@@ -469,7 +469,7 @@ const BlockDetails = ({ query }: Props) => {
> >
<Text wordBreak="break-all" whiteSpace="break-spaces">{ data.state_root }</Text> <Text wordBreak="break-all" whiteSpace="break-spaces">{ data.state_root }</Text>
</DetailsInfoItem> */ } </DetailsInfoItem> */ }
{ config.chain.verificationType !== 'validation' && ( { config.chain.verificationType !== 'validation' && !config.UI.views.block.hiddenFields?.nonce && (
<DetailsInfoItem <DetailsInfoItem
title="Nonce" title="Nonce"
hint="Block nonce is a value used during mining to demonstrate proof of work for a block" hint="Block nonce is a value used during mining to demonstrate proof of work for a block"
......
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