Commit d7365d2c authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #1308 from blockscout/zero-fee-fix

stability fixes
parents ab04ff68 e479df23
...@@ -27,7 +27,7 @@ const TxFeeStability = ({ data, isLoading, hideUsd, accuracy, className }: Props ...@@ -27,7 +27,7 @@ const TxFeeStability = ({ data, isLoading, hideUsd, accuracy, className }: Props
return ( return (
<Skeleton whiteSpace="pre" isLoaded={ !isLoading } display="flex" className={ className }> <Skeleton whiteSpace="pre" isLoaded={ !isLoading } display="flex" className={ className }>
<span>{ valueStr } </span> <span>{ valueStr } </span>
<TokenEntity token={ data.token } noIcon noCopy onlySymbol w="auto"/> { valueStr !== '0' && <TokenEntity token={ data.token } noIcon noCopy onlySymbol w="auto"/> }
{ usd && !hideUsd && <chakra.span color="text_secondary"> (${ usd })</chakra.span> } { usd && !hideUsd && <chakra.span color="text_secondary"> (${ usd })</chakra.span> }
</Skeleton> </Skeleton>
); );
......
...@@ -11,6 +11,7 @@ import getValueWithUnit from 'lib/getValueWithUnit'; ...@@ -11,6 +11,7 @@ import getValueWithUnit from 'lib/getValueWithUnit';
import CurrencyValue from 'ui/shared/CurrencyValue'; import CurrencyValue from 'ui/shared/CurrencyValue';
import LinkInternal from 'ui/shared/LinkInternal'; import LinkInternal from 'ui/shared/LinkInternal';
import TextSeparator from 'ui/shared/TextSeparator'; import TextSeparator from 'ui/shared/TextSeparator';
import TxFeeStability from 'ui/shared/tx/TxFeeStability';
import Utilization from 'ui/shared/Utilization/Utilization'; import Utilization from 'ui/shared/Utilization/Utilization';
const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => { const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => {
...@@ -33,16 +34,20 @@ const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => { ...@@ -33,16 +34,20 @@ const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => {
{ !config.UI.views.tx.hiddenFields?.tx_fee && ( { !config.UI.views.tx.hiddenFields?.tx_fee && (
<Box { ...sectionProps } mb={ 4 }> <Box { ...sectionProps } mb={ 4 }>
<Text { ...sectionTitleProps }>Transaction fee</Text> <Text { ...sectionTitleProps }>Transaction fee</Text>
<Flex> { tx.stability_fee ? (
<CurrencyValue <TxFeeStability data={ tx.stability_fee }/>
value={ tx.fee.value } ) : (
currency={ config.UI.views.tx.hiddenFields?.fee_currency ? '' : config.chain.currency.symbol } <Flex>
exchangeRate={ tx.exchange_rate } <CurrencyValue
accuracyUsd={ 2 } value={ tx.fee.value }
flexWrap="wrap" currency={ config.UI.views.tx.hiddenFields?.fee_currency ? '' : config.chain.currency.symbol }
rowGap={ 0 } exchangeRate={ tx.exchange_rate }
/> accuracyUsd={ 2 }
</Flex> flexWrap="wrap"
rowGap={ 0 }
/>
</Flex>
) }
</Box> </Box>
) } ) }
{ tx.gas_used !== null && ( { tx.gas_used !== null && (
......
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