@ -36,6 +36,7 @@ import InfoTooltip from '../../components/ui/info-tooltip/info-tooltip';
import LoadingHeartBeat from '../../components/ui/loading-heartbeat' ;
import LoadingHeartBeat from '../../components/ui/loading-heartbeat' ;
import GasTiming from '../../components/app/gas-timing/gas-timing.component' ;
import GasTiming from '../../components/app/gas-timing/gas-timing.component' ;
import LedgerInstructionField from '../../components/app/ledger-instruction-field' ;
import LedgerInstructionField from '../../components/app/ledger-instruction-field' ;
import MultiLayerFeeMessage from '../../components/app/multilayer-fee-message' ;
import {
import {
COLORS ,
COLORS ,
@ -134,6 +135,7 @@ export default class ConfirmTransactionBase extends Component {
nativeCurrency : PropTypes . string ,
nativeCurrency : PropTypes . string ,
supportsEIP1559 : PropTypes . bool ,
supportsEIP1559 : PropTypes . bool ,
hardwareWalletRequiresConnection : PropTypes . bool ,
hardwareWalletRequiresConnection : PropTypes . bool ,
isMultiLayerFeeNetwork : PropTypes . bool ,
} ;
} ;
state = {
state = {
@ -315,6 +317,7 @@ export default class ConfirmTransactionBase extends Component {
isMainnet ,
isMainnet ,
showLedgerSteps ,
showLedgerSteps ,
supportsEIP1559 ,
supportsEIP1559 ,
isMultiLayerFeeNetwork ,
} = this . props ;
} = this . props ;
const { t } = this . context ;
const { t } = this . context ;
@ -433,7 +436,9 @@ export default class ConfirmTransactionBase extends Component {
detailTitle = {
detailTitle = {
txData . dappSuggestedGasFees ? (
txData . dappSuggestedGasFees ? (
< >
< >
{ t ( 'transactionDetailGasHeading' ) }
{ isMultiLayerFeeNetwork
? t ( 'transactionDetailLayer2GasHeading' )
: t ( 'transactionDetailGasHeading' ) }
< InfoTooltip
< InfoTooltip
contentText = { t ( 'transactionDetailDappGasTooltip' ) }
contentText = { t ( 'transactionDetailDappGasTooltip' ) }
position = "top"
position = "top"
@ -443,7 +448,9 @@ export default class ConfirmTransactionBase extends Component {
< / >
< / >
) : (
) : (
< >
< >
{ t ( 'transactionDetailGasHeading' ) }
{ isMultiLayerFeeNetwork
? t ( 'transactionDetailLayer2GasHeading' )
: t ( 'transactionDetailGasHeading' ) }
< InfoTooltip
< InfoTooltip
contentText = {
contentText = {
< >
< >
@ -473,14 +480,16 @@ export default class ConfirmTransactionBase extends Component {
}
}
detailTitleColor = { COLORS . BLACK }
detailTitleColor = { COLORS . BLACK }
detailText = {
detailText = {
< div className = "confirm-page-container-content__currency-container" >
! isMultiLayerFeeNetwork && (
{ renderHeartBeatIfNotInTest ( ) }
< div className = "confirm-page-container-content__currency-container" >
< UserPreferencedCurrencyDisplay
{ renderHeartBeatIfNotInTest ( ) }
type = { SECONDARY }
< UserPreferencedCurrencyDisplay
value = { hexMinimumTransactionFee }
type = { SECONDARY }
hideLabel = { Boolean ( useNativeCurrencyAsPrimaryCurrency ) }
value = { hexMinimumTransactionFee }
/ >
hideLabel = { Boolean ( useNativeCurrencyAsPrimaryCurrency ) }
< / d i v >
/ >
< / d i v >
)
}
}
detailTotal = {
detailTotal = {
< div className = "confirm-page-container-content__currency-container" >
< div className = "confirm-page-container-content__currency-container" >
@ -489,26 +498,30 @@ export default class ConfirmTransactionBase extends Component {
type = { PRIMARY }
type = { PRIMARY }
value = { hexMinimumTransactionFee }
value = { hexMinimumTransactionFee }
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
numberOfDecimals = { isMultiLayerFeeNetwork ? 18 : 6 }
/ >
/ >
< / d i v >
< / d i v >
}
}
subText = { t ( 'editGasSubTextFee' , [
subText = {
< b key = "editGasSubTextFeeLabel" >
! isMultiLayerFeeNetwork &&
{ t ( 'editGasSubTextFeeLabel' ) }
t ( 'editGasSubTextFee' , [
< / b > ,
< b key = "editGasSubTextFeeLabel" >
< div
{ t ( 'editGasSubTextFeeLabel' ) }
key = "editGasSubTextFeeValue"
< / b > ,
className = "confirm-page-container-content__currency-container"
< div
>
key = "editGasSubTextFeeValue"
{ renderHeartBeatIfNotInTest ( ) }
className = "confirm-page-container-content__currency-container"
< UserPreferencedCurrencyDisplay
>
key = "editGasSubTextFeeAmount"
{ renderHeartBeatIfNotInTest ( ) }
type = { PRIMARY }
< UserPreferencedCurrencyDisplay
value = { hexMaximumTransactionFee }
key = "editGasSubTextFeeAmount"
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
type = { PRIMARY }
/ >
value = { hexMaximumTransactionFee }
< / d i v > ,
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
] ) }
/ >
< / d i v > ,
] )
}
subTitle = {
subTitle = {
< >
< >
{ txData . dappSuggestedGasFees ? (
{ txData . dappSuggestedGasFees ? (
@ -537,19 +550,27 @@ export default class ConfirmTransactionBase extends Component {
}
}
/ >
/ >
) ,
) ,
< TransactionDetailItem
isMultiLayerFeeNetwork && (
key = "total-item"
< MultiLayerFeeMessage
detailTitle = { t ( 'total' ) }
transaction = { txData }
detailText = { renderTotalDetailText ( ) }
layer2fee = { hexMinimumTransactionFee }
detailTotal = { renderTotalDetailTotal ( ) }
/ >
subTitle = { t ( 'transactionDetailGasTotalSubtitle' ) }
) ,
subText = { t ( 'editGasSubTextAmount' , [
! isMultiLayerFeeNetwork && (
< b key = "editGasSubTextAmountLabel" >
< TransactionDetailItem
{ t ( 'editGasSubTextAmountLabel' ) }
key = "total-item"
< / b > ,
detailTitle = { t ( 'total' ) }
renderTotalMaxAmount ( ) ,
detailText = { renderTotalDetailText ( ) }
] ) }
detailTotal = { renderTotalDetailTotal ( ) }
/ > ,
subTitle = { t ( 'transactionDetailGasTotalSubtitle' ) }
subText = { t ( 'editGasSubTextAmount' , [
< b key = "editGasSubTextAmountLabel" >
{ t ( 'editGasSubTextAmountLabel' ) }
< / b > ,
renderTotalMaxAmount ( ) ,
] ) }
/ >
) ,
] }
] }
/ >
/ >
{ nonceField }
{ nonceField }