Skip to content

Commit

Permalink
Merge pull request #38 from codingknite/fix-burnt-fees-icons
Browse files Browse the repository at this point in the history
Fix burnt fees icons
  • Loading branch information
codingknite authored Oct 28, 2024
2 parents 9efa1d0 + a6cd9f7 commit 662ccfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ui/snippets/header/Burger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Burger = ({ isMarketplaceAppPage }: Props) => {
<DrawerOverlay/>
<DrawerContent maxWidth="330px">
<DrawerBody p={ 6 } display="flex" flexDirection="column">
{ config.chain.isTestnet && <IconSvg name="testnet" h="14px" w="37px" color="red.400" alignSelf="flex-start"/> }
{ config.chain.isTestnet && <IconSvg name="testnetv2" h="14px" w="37px" color="red.400" alignSelf="flex-start"/> }
<Flex alignItems="center" justifyContent="space-between">
<NetworkLogo onClick={ handleNetworkLogoClick }/>
{ config.UI.sidebar.featuredNetworks ? (
Expand Down
9 changes: 1 addition & 8 deletions ui/tx/details/TxDetailsBurntFees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ import { TbCoins } from 'react-icons/tb';

import type { Transaction } from 'types/api/transaction';

import config from 'configs/app';
import { ZERO } from 'lib/consts';
import { currencyUnits } from 'lib/units';
import CurrencyValue from 'ui/shared/CurrencyValue';
import * as DetailsInfoItem from 'ui/shared/DetailsInfoItem';

const rollupFeature = config.features.rollup;

interface Props {
data: Transaction;
isLoading?: boolean;
}

const TxDetailsBurntFees = ({ data, isLoading }: Props) => {

if (config.UI.views.tx.hiddenFields?.burnt_fees || (rollupFeature.isEnabled && rollupFeature.type === 'optimistic')) {
return null;
}

const value = BigNumber(data.tx_burnt_fee || 0).plus(BigNumber(data.blob_gas_used || 0).multipliedBy(BigNumber(data.blob_gas_price || 0)));

if (value.isEqualTo(ZERO)) {
Expand All @@ -43,7 +36,7 @@ const TxDetailsBurntFees = ({ data, isLoading }: Props) => {
</DetailsInfoItem.Label>
<DetailsInfoItem.Value>
<Skeleton isLoaded={ !isLoading } display="inline-block">
<TbCoins size={ 20 } color="gray.500"/>
<TbCoins size={ 20 } color="#718096"/>
</Skeleton>
<CurrencyValue
value={ value.toString() }
Expand Down

0 comments on commit 662ccfc

Please sign in to comment.