Remove unnecessary nested spans

This commit is contained in:
Willian Mitsuda 2021-11-11 16:14:04 -03:00
parent 36b5437643
commit 5b203bc8d4
1 changed files with 27 additions and 39 deletions

View File

@ -225,17 +225,15 @@ const Details: React.FC<DetailsProps> = ({
)} )}
{txData.tokenTransfers.length > 0 && ( {txData.tokenTransfers.length > 0 && (
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}> <InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
<div> {txData.tokenTransfers.map((t, i) => (
{txData.tokenTransfers.map((t, i) => ( <TokenTransferItem
<TokenTransferItem key={i}
key={i} t={t}
t={t} tokenMeta={txData.tokenMetas[t.token]}
tokenMeta={txData.tokenMetas[t.token]} resolvedAddresses={resolvedAddresses}
resolvedAddresses={resolvedAddresses} metadatas={metadatas}
metadatas={metadatas} />
/> ))}
))}
</div>
</InfoRow> </InfoRow>
)} )}
<InfoRow title="Value"> <InfoRow title="Value">
@ -262,24 +260,16 @@ const Details: React.FC<DetailsProps> = ({
{txData.type === 2 && ( {txData.type === 2 && (
<> <>
<InfoRow title="Max Priority Fee Per Gas"> <InfoRow title="Max Priority Fee Per Gas">
<span> <FormattedBalance value={txData.maxPriorityFeePerGas!} /> Ether (
<FormattedBalance value={txData.maxPriorityFeePerGas!} /> Ether ( <FormattedBalance
<FormattedBalance value={txData.maxPriorityFeePerGas!}
value={txData.maxPriorityFeePerGas!} decimals={9}
decimals={9} />{" "}
/>{" "} Gwei)
Gwei)
</span>
</InfoRow> </InfoRow>
<InfoRow title="Max Fee Per Gas"> <InfoRow title="Max Fee Per Gas">
<span> <FormattedBalance value={txData.maxFeePerGas!} /> Ether (
<FormattedBalance value={txData.maxFeePerGas!} /> Ether ( <FormattedBalance value={txData.maxFeePerGas!} decimals={9} /> Gwei)
<FormattedBalance
value={txData.maxFeePerGas!}
decimals={9}
/>{" "}
Gwei)
</span>
</InfoRow> </InfoRow>
</> </>
)} )}
@ -321,18 +311,16 @@ const Details: React.FC<DetailsProps> = ({
)} )}
{txData.confirmedData && hasEIP1559 && ( {txData.confirmedData && hasEIP1559 && (
<InfoRow title="Block Base Fee"> <InfoRow title="Block Base Fee">
<span> <FormattedBalance
<FormattedBalance value={txData.confirmedData.blockBaseFeePerGas!}
value={txData.confirmedData.blockBaseFeePerGas!} decimals={9}
decimals={9} />{" "}
/>{" "} Gwei (
Gwei ( <FormattedBalance
<FormattedBalance value={txData.confirmedData.blockBaseFeePerGas!}
value={txData.confirmedData.blockBaseFeePerGas!} decimals={0}
decimals={0} />{" "}
/>{" "} wei)
wei)
</span>
</InfoRow> </InfoRow>
)} )}
{txData.confirmedData && ( {txData.confirmedData && (