mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Transaction cleanup and fix TransactionDetailItem key not unique bug (#18899)
* TransactionDetailItem: allow empty detailText * TxDetailItem: fix keys; ensure unique keys
This commit is contained in:
parent
36092571c6
commit
a5d7cf3319
@ -135,7 +135,7 @@ export default function ApproveContentCard({
|
||||
className="approve-content-card-container__transaction-details-extra-content"
|
||||
>
|
||||
<TransactionDetailItem
|
||||
key="total-item"
|
||||
key="approve-content-card-min-tx-fee"
|
||||
detailTitle={t('transactionDetailLayer2GasHeading')}
|
||||
detailTotal={
|
||||
<UserPreferencedCurrencyDisplay
|
||||
|
@ -53,7 +53,7 @@ const ConfirmLegacyGasDisplay = () => {
|
||||
if (isMultiLayerFeeNetwork) {
|
||||
return [
|
||||
<TransactionDetailItem
|
||||
key="total-item"
|
||||
key="legacy-total-item"
|
||||
detailTitle={t('transactionDetailLayer2GasHeading')}
|
||||
detailTotal={
|
||||
<UserPreferencedCurrencyDisplay
|
||||
|
@ -52,7 +52,7 @@ const GasDetailsItem = ({ userAcknowledgedGasMissing = false }) => {
|
||||
|
||||
return (
|
||||
<TransactionDetailItem
|
||||
key="gas-item"
|
||||
key="gas-details-item"
|
||||
detailTitle={<GasDetailsItemTitle />}
|
||||
detailTitleColor={TextColor.textDefault}
|
||||
detailText={
|
||||
|
@ -92,7 +92,7 @@ export default function MultilayerFeeMessage({
|
||||
return (
|
||||
<div className="multi-layer-fee-message">
|
||||
<TransactionDetailItem
|
||||
key="total-item-gas-fee"
|
||||
key="multi-layer-fee-message-total-item-gas-fee"
|
||||
detailTitle={t('layer1Fees')}
|
||||
detailTotal={layer1Total}
|
||||
detailText={useCurrencyRateCheck && feeTotalInFiat}
|
||||
@ -100,7 +100,7 @@ export default function MultilayerFeeMessage({
|
||||
flexWidthValues={plainStyle}
|
||||
/>
|
||||
<TransactionDetailItem
|
||||
key="total-item-total"
|
||||
key="multi-layer-fee-message-total-item-total"
|
||||
detailTitle={t('total')}
|
||||
detailTotal={totalInEth}
|
||||
detailText={totalInFiat}
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
|
||||
export default function TransactionDetailItem({
|
||||
detailTitle = '',
|
||||
detailText = '',
|
||||
detailText,
|
||||
detailTitleColor = Color.textDefault,
|
||||
detailTotal = '',
|
||||
subTitle = '',
|
||||
|
@ -187,7 +187,7 @@ export default class ConfirmApproveContent extends Component {
|
||||
{isMultiLayerFeeNetwork ? (
|
||||
<div className="confirm-approve-content__transaction-details-extra-content">
|
||||
<TransactionDetailItem
|
||||
key="total-item"
|
||||
key="confirm-approve-content-min-tx-fee"
|
||||
detailTitle={t('transactionDetailLayer2GasHeading')}
|
||||
detailTotal={
|
||||
<UserPreferencedCurrencyDisplay
|
||||
|
@ -457,7 +457,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
),
|
||||
!isMultiLayerFeeNetwork && (
|
||||
<TransactionDetailItem
|
||||
key="total-item"
|
||||
key="confirm-transaction-base-total-item"
|
||||
detailTitle={t('total')}
|
||||
detailText={useCurrencyRateCheck && renderTotalDetailText()}
|
||||
detailTotal={renderTotalDetailTotal()}
|
||||
|
@ -159,7 +159,7 @@ export default function GasDisplay({ gasError }) {
|
||||
<ConfirmGasDisplay key="gas-display" />,
|
||||
(gasError || isInsufficientTokenError) && (
|
||||
<TransactionDetailItem
|
||||
key="total-item"
|
||||
key="gas-display-total-item"
|
||||
detailTitle={t('total')}
|
||||
detailText={
|
||||
showCurrencyRateCheck && (
|
||||
|
Loading…
Reference in New Issue
Block a user