Skip to content

Commit ba5733a

Browse files
remove concept of burnt fees
1 parent 8a3b3d9 commit ba5733a

7 files changed

+9
-116
lines changed

ui/block/BlockDetails.tsx

+2-24
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ import BatchEntityL2 from 'ui/shared/entities/block/BatchEntityL2';
3030
import BlockEntityL1 from 'ui/shared/entities/block/BlockEntityL1';
3131
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
3232
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
33-
import IconSvg from 'ui/shared/IconSvg';
3433
import LinkInternal from 'ui/shared/links/LinkInternal';
3534
import PrevNext from 'ui/shared/PrevNext';
3635
import RawDataSnippet from 'ui/shared/RawDataSnippet';
3736
import StatusTag from 'ui/shared/statusTag/StatusTag';
38-
import Utilization from 'ui/shared/Utilization/Utilization';
3937
import VerificationSteps from 'ui/shared/verificationSteps/VerificationSteps';
4038
import ZkSyncL2TxnBatchHashesInfo from 'ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchHashesInfo';
4139

@@ -106,14 +104,6 @@ const BlockDetails = ({ query }: Props) => {
106104
</Tooltip>
107105
</>
108106
) }
109-
{ !burntFees.isEqualTo(ZERO) && (
110-
<>
111-
{ space }-{ space }
112-
<Tooltip label="Burnt fees">
113-
<span>{ burntFees.dividedBy(WEI).toFixed() }</span>
114-
</Tooltip>
115-
</>
116-
) }
117107
</Text>
118108
);
119109
})();
@@ -516,24 +506,12 @@ const BlockDetails = ({ query }: Props) => {
516506
}
517507
isLoading={ isPlaceholderData }
518508
>
519-
Burnt fees
509+
Txn fees
520510
</DetailsInfoItem.Label>
521511
<DetailsInfoItem.Value>
522-
<IconSvg name="flame" boxSize={ 5 } color="gray.500" isLoading={ isPlaceholderData }/>
523512
<Skeleton isLoaded={ !isPlaceholderData } ml={ 2 }>
524-
{ burntFees.dividedBy(WEI).toFixed() } { currencyUnits.ether }
513+
{ txFees.dividedBy(WEI).toFixed() } { currencyUnits.ether }
525514
</Skeleton>
526-
{ !txFees.isEqualTo(ZERO) && (
527-
<Tooltip label="Burnt fees / Txn fees * 100%">
528-
<Box>
529-
<Utilization
530-
ml={ 4 }
531-
value={ burntFees.dividedBy(txFees).toNumber() }
532-
isLoading={ isPlaceholderData }
533-
/>
534-
</Box>
535-
</Tooltip>
536-
) }
537515
</DetailsInfoItem.Value>
538516
</>
539517
) }

ui/block/details/BlockDetailsBlobInfo.tsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, Tooltip } from '@chakra-ui/react';
1+
import { Text } from '@chakra-ui/react';
22
import BigNumber from 'bignumber.js';
33
import React from 'react';
44

@@ -10,7 +10,6 @@ import { currencyUnits } from 'lib/units';
1010
import * as DetailsInfoItem from 'ui/shared/DetailsInfoItem';
1111
import DetailsInfoItemDivider from 'ui/shared/DetailsInfoItemDivider';
1212
import IconSvg from 'ui/shared/IconSvg';
13-
import Utilization from 'ui/shared/Utilization/Utilization';
1413

1514
interface Props {
1615
data: Block;
@@ -65,18 +64,11 @@ const BlockDetailsBlobInfo = ({ data }: Props) => {
6564
<DetailsInfoItem.Label
6665
hint={ `Amount of ${ currencyUnits.ether } used for blobs in this block` }
6766
>
68-
Blob burnt fees
67+
Blob txn fees
6968
</DetailsInfoItem.Label>
7069
<DetailsInfoItem.Value>
7170
<IconSvg name="flame" boxSize={ 5 } color="gray.500" mr={ 2 }/>
72-
{ burntBlobFees.dividedBy(WEI).toFixed() } { currencyUnits.ether }
73-
{ !blobFees.isEqualTo(ZERO) && (
74-
<Tooltip label="Blob burnt fees / Txn fees * 100%">
75-
<div>
76-
<Utilization ml={ 4 } value={ burntBlobFees.dividedBy(blobFees).toNumber() }/>
77-
</div>
78-
</Tooltip>
79-
) }
71+
{ blobFees.dividedBy(WEI).toFixed() } { currencyUnits.ether }
8072
</DetailsInfoItem.Value>
8173
</>
8274
) }

ui/blocks/BlocksListItem.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import IconSvg from 'ui/shared/IconSvg';
2020
import LinkInternal from 'ui/shared/links/LinkInternal';
2121
import ListItemMobile from 'ui/shared/ListItemMobile/ListItemMobile';
2222
import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip';
23-
import Utilization from 'ui/shared/Utilization/Utilization';
2423

2524
import { getBaseFeeValue } from './utils';
2625

@@ -34,7 +33,6 @@ const isRollup = config.features.rollup.isEnabled;
3433

3534
const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
3635
const totalReward = getBlockTotalReward(data);
37-
const burntFees = BigNumber(data.burnt_fees || 0);
3836
const txFees = BigNumber(data.transaction_fees || 0);
3937
const baseFeeValue = getBaseFeeValue(data.base_fee_per_gas);
4038

@@ -116,15 +114,13 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
116114
) }
117115
{ !isRollup && !config.UI.views.block.hiddenFields?.burnt_fees && (
118116
<Box>
119-
<Text fontWeight={ 500 }>Burnt fees</Text>
117+
<Text fontWeight={ 500 }>Txn fees</Text>
120118
<Flex columnGap={ 4 } mt={ 2 }>
121119
<Flex>
122-
<IconSvg name="flame" boxSize={ 5 } color="gray.500" isLoading={ isLoading }/>
123120
<Skeleton isLoaded={ !isLoading } display="inline-block" color="text_secondary" ml={ 2 }>
124-
<span>{ burntFees.div(WEI).toFixed() }</span>
121+
<span>{ txFees.div(WEI).toFixed() }</span>
125122
</Skeleton>
126123
</Flex>
127-
<Utilization ml={ 4 } value={ burntFees.div(txFees).toNumber() } isLoading={ isLoading }/>
128124
</Flex>
129125
</Box>
130126
) }

ui/blocks/BlocksTable.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum
5151
<Th width={ `${ GAS_COL_WEIGHT / widthBase * 100 }%` }>Gas used</Th>
5252
{ !isRollup && !config.UI.views.block.hiddenFields?.total_reward &&
5353
<Th width={ `${ REWARD_COL_WEIGHT / widthBase * 100 }%` }>Reward { currencyUnits.ether }</Th> }
54-
{ !isRollup && !config.UI.views.block.hiddenFields?.burnt_fees &&
55-
<Th width={ `${ FEES_COL_WEIGHT / widthBase * 100 }%` }>Burnt fees { currencyUnits.ether }</Th> }
5654
{ !isRollup && !config.UI.views.block.hiddenFields?.base_fee &&
5755
<Th width="150px" isNumeric>Base fee</Th> }
5856
</Tr>

ui/blocks/BlocksTableItem.tsx

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tr, Td, Flex, Box, Tooltip, useColorModeValue } from '@chakra-ui/react';
1+
import { Tr, Td, Flex, Tooltip } from '@chakra-ui/react';
22
import BigNumber from 'bignumber.js';
33
import { motion } from 'framer-motion';
44
import React from 'react';
@@ -17,7 +17,6 @@ import BlockEntity from 'ui/shared/entities/block/BlockEntity';
1717
import IconSvg from 'ui/shared/IconSvg';
1818
import LinkInternal from 'ui/shared/links/LinkInternal';
1919
import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip';
20-
import Utilization from 'ui/shared/Utilization/Utilization';
2120

2221
import { getBaseFeeValue } from './utils';
2322

@@ -31,11 +30,8 @@ const isRollup = config.features.rollup.isEnabled;
3130

3231
const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
3332
const totalReward = getBlockTotalReward(data);
34-
const burntFees = BigNumber(data.burnt_fees || 0);
3533
const txFees = BigNumber(data.transaction_fees || 0);
3634

37-
const burntFeesIconColor = useColorModeValue('gray.500', 'inherit');
38-
3935
const baseFeeValue = getBaseFeeValue(data.base_fee_per_gas);
4036

4137
return (
@@ -123,16 +119,10 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
123119
{ !isRollup && !config.UI.views.block.hiddenFields?.burnt_fees && (
124120
<Td fontSize="sm">
125121
<Flex alignItems="center" columnGap={ 2 }>
126-
<IconSvg name="flame" boxSize={ 5 } color={ burntFeesIconColor } isLoading={ isLoading }/>
127122
<Skeleton isLoaded={ !isLoading } display="inline-block">
128-
{ burntFees.dividedBy(WEI).toFixed(8) }
123+
{ txFees.dividedBy(WEI).toFixed(8) }
129124
</Skeleton>
130125
</Flex>
131-
<Tooltip label={ isLoading ? undefined : 'Burnt fees / Txn fees * 100%' }>
132-
<Box w="min-content">
133-
<Utilization mt={ 2 } value={ burntFees.div(txFees).toNumber() } isLoading={ isLoading }/>
134-
</Box>
135-
</Tooltip>
136126
</Td>
137127
) }
138128
{ !isRollup && !config.UI.views.block.hiddenFields?.base_fee && Boolean(baseFeeValue) && (

ui/tx/details/TxDetailsBurntFees.tsx

-58
This file was deleted.

ui/tx/details/TxInfo.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import TxFee from 'ui/shared/tx/TxFee';
5252
import Utilization from 'ui/shared/Utilization/Utilization';
5353
import VerificationSteps from 'ui/shared/verificationSteps/VerificationSteps';
5454
import TxDetailsActions from 'ui/tx/details/txDetailsActions/TxDetailsActions';
55-
import TxDetailsBurntFees from 'ui/tx/details/TxDetailsBurntFees';
5655
import TxDetailsFeePerGas from 'ui/tx/details/TxDetailsFeePerGas';
5756
import TxDetailsGasPrice from 'ui/tx/details/TxDetailsGasPrice';
5857
import TxDetailsOther from 'ui/tx/details/TxDetailsOther';
@@ -744,8 +743,6 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
744743
</>
745744
) }
746745

747-
<TxDetailsBurntFees data={ data } isLoading={ isLoading }/>
748-
749746
{ rollupFeature.isEnabled && rollupFeature.type === 'optimistic' && (
750747
<>
751748
{ data.l1_gas_used && (

0 commit comments

Comments
 (0)